---
updatedAt: 2026-10-26T12:34:40.000Z
---

# Create Payment

Creates the payment transaction using a tokenized card.

<div class="note-yellow" style="background-color: #fdfaf0; padding: 10px">

For Basic Authentication, use **SECRET API KEY**. <a href="/reference/basic-authentication" target="_blank" style="text-decoration:none;">**Learn more** <img class="icon-redirect"/></a>

</div>

The **Create Payment** endpoint supports two specifications:

* **Kount Buyer** - Use when <a href="/docs/fraud-protection" target="\_blank" style="text-decoration:none;"> **Kount Fraud Protection** <img class="icon-redirect"/></a> is **enabled**. All fields tagged as required **must be provided**; others are optional.
* **Basic Buyer** – Use when Kount is NOT enabled. All fields are optional, but **at least one valid field** must be provided.

***

# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://pg-sandbox.paymaya.com",
      "description": "Sandbox"
    },
    {
      "url": "https://pg.paymaya.com",
      "description": "Production"
    }
  ],
  "info": {
    "version": "1.0.0",
    "title": "PayMaya Payment Gateway - Payment Vault",
    "termsOfService": "https://developers.paymaya.com/terms",
    "contact": {
      "name": "PayMaya Product Engineering - Payments Services Engineering",
      "email": "PaymentsServicesEngineering@paymaya.com",
      "url": "https://enterprise.paymaya.com"
    },
    "x-logo": {
      "url": "https://cdn.paymaya.com/production/devportal/www/images/Logo_Header_v2.png",
      "altText": "PayMaya Developers"
    },
    "description": "# API Authentication\nAuthentication is done via [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme). Depending on the API, the public / secret key must be provided and the username and the password left as blank.\n\nSteps are as follows:\n1.  Combine Username and Password (left blank) separated by ‘:’ (colon). If your API key is “pk-Z0OSzLvIcOI2UIvDhdTGVVfRSSeiGStnceqwUE7n0Ah”, the resulting string is:\n\n```no-highlight\npk-Z0OSzLvIcOI2UIvDhdTGVVfRSSeiGStnceqwUE7n0Ah:\n```\n\n2.  Apply Base64 encoding to the resulting string from Step 1. Using the resulting string from Step 1, the Base64 encoded string will be:\n\n```no-highlight\ncGstWjBPU3pMdkljT0kyVUl2RGhkVEdWVmZSU1NlaUdTdG5jZXF3VUU3bjBBaDo=\n```\n\n3.  Indicate the authorization method i.e. “Basic” followed by a space then the Base64 encoded string in Step 2. An example is shown below.\n\n```no-highlight\nAuthorization: Basic cGstWjBPU3pMdkljT0kyVUl2RGhkVEdWVmZSU1NlaUdTdG5jZXF3VUU3bjBBaDo=\n```\n\n# Environment Setup\nPayMaya Payment Gateway has two environments:\n**Sandbox** and **Production**.\n\n**Sandbox** is used for development, testing and integration. Once integration is completed on this environment it will be verified by our Merchant Services team. Only then will production credentials be provided. \n\n- Sandbox Url: https://pg-sandbox.paymaya.com\n\n> Load testing is not allowed on both environments. If you have need for load testing please contact us.\n\n**Production** is for live payments. Testing in this environment will incur real charges\n- Production Url: https://pg.paymaya.com\n\n# Sandbox Credentials\n\n## Merchant Accounts\n\nThese sandbox credentials are for **public use**. As such, other merchants may use them simultaneously.\n\n> Once a merchant is on-boarded to PayMaya, they will be granted private access credentials in sandbox for their testing.\nProduction credentials are provided after sandbox testing.\n\n| Merchant Name | Secret API Keys | Public API Keys\n|-|-|-\n| Sandbox Party 1 | sk-X8qolYjy62kIzEbr0QRK1h4b4KDVHaNcwMYk39jInSl | pk-Z0OSzLvIcOI2UIvDhdTGVVfRSSeiGStnceqwUE7n0Ah |\n| Sandbox Party 2 | sk-KfmfLJXFdV5t1inYN8lIOwSrueC1G27SCAklBqYCdrU | pk-eo4sL393CWU5KmveJUaW8V730TTei2zY8zE4dHJDxkF | \n| Sandbox Party 3 | sk-fzukI3GXrzNIUyvXY3n16cji8VTJITfzylz5o5QzZMC | pk-lNAUk1jk7VPnf7koOT1uoGJoZJjmAxrbjpj6urB8EIA | \n| Sandbox Party 4 | sk-VGDKY3P90NYZZ0kSWqBFaD1NTIXQCxtdS7SbQXvcA4g | pk-yaj6GVzYkce52R193RIWpuRR5tTZKqzBWsUeCkP9EAf | \n| Sandbox Party 5 | sk-8MqXdZYWV9UJB92Mc0i149CtzTWT7BYBQeiarM27iAi | pk-NCLk7JeDbX1m22ZRMDYO9bEPowNWT5J4aNIKIbcTy2a | \n\n## Test Cards\n\nThe following are test cards are for **sandbox use only** (e.g. they will not work on production). Similarly, production cards will not work in sandbox environment.\n\n| Card Scheme | PAN | Expiry Month | Expiry year | CSC/CVV | 3-D Secure Password |\n|-|-|-|-|-|-|\n| MASTERCARD | 5123456789012346 | 12 | 2025 | 111 | Not enabled |\n| MASTERCARD | 5453010000064154 | 12 | 2025 | 111 | secbarry1 |\n| VISA | 4123450131001381 | 12 | 2025 | 123 | mctest1 |\n| VISA | 4123450131001522 | 12 | 2025 | 123 | mctest1 |\n| VISA | 4123450131004443 | 12 | 2025 | 123 | mctest1 |\n| VISA | 4123450131000508 | 12 | 2025 | 111 | Not enabled |\n\n> For a full list of sandbox cards and additional test cases, please refer [here](https://mock-processor-sandbox.paymaya.com/cards)\n\n# Features\n\n## Payment Facilitator\n\nFor a payment facilitator (PF) account, some information are required to identify payment transactions to the correct sub-merchant.\nThis set of information is passed through the **metadata** property of the JSON request body.\n\nThe following is the specification of all the PF information that are required and may be provided through the metadata object:\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Metadata\" exampleRef=\"#/components/examples/Metadata\"/>\n\n"
  },
  "tags": [
    {
      "name": "One-time Payments",
      "description": "One-time Payment is a single payment execution using a Payment Token.\n\n> Card tokenization or card information collection MUST be client-side. Card information MUST NOT pass thru the merchant server unless merchant is **PCI-DSS Certified**.\n\n## Payment Flow\n```mermaid\nsequenceDiagram\nCustomer ->> Merchant: Initiate Payment\n\nMerchant -->> Customer: Get Payment Token\nCustomer ->> Payment Gateway: Tokenize Card\nPayment Gateway --> Customer: Return Payment Token\nCustomer ->> Merchant: Send Payment Token\n\nMerchant ->> Payment Gateway: Create Payment\nPayment Gateway -->> Merchant: Return verificationUrl\n\nMerchant -->> Customer: Redirect to webpage\nCustomer ->> Payment Gateway: Customer completes authentication\nPayment Gateway -->> Customer: Show status page\n\nalt Payment Confirmation\n  Customer ->> Merchant: Redirect back to Merchant\n  Merchant ->> Payment Gateway: Get Payment\n  Payment Gateway -->> Merchant: Returns\nelse\n  Payment Gateway ->> Merchant: Sends Webhook\nend\n```"
    }
  ],
  "paths": {
    "/payments/v1/payments": {
      "post": {
        "tags": [
          "One-time Payments"
        ],
        "summary": "Create Payment",
        "security": [
          {
            "secretKey": []
          }
        ],
        "operationId": "createV1Payment",
        "requestBody": {
          "description": "Payment",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OneTimePaymentRequest"
              },
              "examples": {
                "OneTimePaymentRequest": {
                  "$ref": "#/components/examples/OneTimePaymentRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created Payment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponse"
                },
                "examples": {
                  "OneTimePaymentResponse": {
                    "$ref": "#/components/examples/OneTimePaymentResponse"
                  }
                }
              }
            }
          }
        },
        "description": "Creates the payment transaction using a tokenized card."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "secretKey": {
        "type": "http",
        "scheme": "basic",
        "description": "Merchant keys that are used to access secret endpoints. These endpoints are normally triggered from the merchant's backend system,\nand should not be loaded on the frontend apps and/or distributed in public.\n"
      }
    },
    "schemas": {
      "PaymentTokenId": {
        "title": "Payment Token ID",
        "type": "string",
        "description": "The string token representing the card information (only relevant for card-based payments).",
        "example": "0zjacza65HEobriYGN9g5XwaWZYVSeErdNnaNCLCo8QvUXuGg49KPJSy1XbhHPL8OisYOiYPJSQ2BxqR2AuC682Yu5G5LzrU0SK6ByWi0TyhkekWf1ssl6cMBWAVAOdArLcY1QXEyHdr8EsRAS2bHeMEpUU6OSmxmky5Fk"
      },
      "CreatedAt": {
        "type": "string",
        "format": "date-time",
        "description": "The timestamp in UTC when the record is created."
      },
      "UpdatedAt": {
        "type": "string",
        "format": "date-time",
        "description": "The timestamp in UTC when the record is last updated."
      },
      "Issuer": {
        "type": "string",
        "description": "Name of the issuing bank as provided by https://binlist.net."
      },
      "Amount": {
        "type": "number",
        "format": "float",
        "minimum": 0.01,
        "maximum": 9999999,
        "description": "Amount of the transaction."
      },
      "Currency": {
        "type": "string",
        "minLength": 3,
        "maxLength": 3,
        "description": "[ISO 4217 Alpha-3](https://www.iso.org/iso-4217-currency-codes.html) currency code\n",
        "example": "PHP"
      },
      "TotalAmount-Amount": {
        "type": "object",
        "title": "Total Amount",
        "required": [
          "amount",
          "currency"
        ],
        "description": "Contains the value and currency of the transaction.",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          }
        }
      },
      "Sex": {
        "type": "string",
        "enum": [
          "M",
          "F"
        ],
        "description": "Biological sex."
      },
      "Phone": {
        "type": "string",
        "format": "phone",
        "minLength": 1,
        "maxLength": 1000,
        "description": "Contact phone number."
      },
      "Email": {
        "type": "string",
        "format": "email",
        "minLength": 5,
        "maxLength": 1000,
        "description": "Contact e-mail address."
      },
      "Contact": {
        "type": "object",
        "title": "Contact Details",
        "description": "Contact details like phone and/or email address.",
        "properties": {
          "phone": {
            "$ref": "#/components/schemas/Phone"
          },
          "email": {
            "$ref": "#/components/schemas/Email"
          }
        }
      },
      "BaseAddress": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "description": "Address Line 1.",
            "minLength": 1,
            "maxLength": 1000
          },
          "line2": {
            "type": "string",
            "description": "Address Line 2.",
            "minLength": 1,
            "maxLength": 1000
          },
          "city": {
            "type": "string",
            "description": "City",
            "minLength": 1,
            "maxLength": 1000
          },
          "state": {
            "type": "string",
            "description": "State / Province.",
            "minLength": 1,
            "maxLength": 1000
          },
          "zipCode": {
            "type": "string",
            "description": "Zip / Postal code.",
            "minLength": 1,
            "maxLength": 1000
          },
          "countryCode": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "description": "[ISO 3166 alpha-2](https://www.iso.org/iso-3166-country-codes.html) notation of the country.\n"
          }
        }
      },
      "BillingAddress-Basic": {
        "type": "object",
        "title": "Basic Billing Address",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseAddress"
          }
        ]
      },
      "BillingAddress-Kount": {
        "type": "object",
        "title": "Kount Billing Address",
        "required": [
          "countryCode"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseAddress"
          }
        ]
      },
      "BillingAddress-All": {
        "type": "object",
        "title": "Billing Address",
        "description": "Contains billing information of the payer/buyer. By default, all information are optional (i.e. use `Basic Billing Address` specification).\nHowever, If the merchant is enabled to use Kount fraud protection, they must use `Kount Billing Address` specification.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/BillingAddress-Basic"
          },
          {
            "$ref": "#/components/schemas/BillingAddress-Kount"
          }
        ]
      },
      "ShippingTypes": {
        "type": "string",
        "enum": [
          "ST",
          "SD"
        ],
        "description": "* `ST` - Standard shipping\n* `SD` - Same-day shipping\n"
      },
      "ShippingAddress-Basic": {
        "type": "object",
        "title": "Basic Shipping Address",
        "description": "Contains shipment information including name of the person identified to receive the purchase order.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseAddress"
          },
          {
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string",
                "description": "First name of the recipient.",
                "minLength": 1,
                "maxLength": 1000,
                "example": "Maya"
              },
              "middleName": {
                "type": "string",
                "description": "Middle name of the recipient.",
                "minLength": 1,
                "maxLength": 1000,
                "example": "Jose"
              },
              "lastName": {
                "type": "string",
                "description": "Last name of the recipient.",
                "minLength": 1,
                "maxLength": 1000,
                "example": "Juan"
              },
              "phone": {
                "$ref": "#/components/schemas/Phone"
              },
              "email": {
                "$ref": "#/components/schemas/Email"
              },
              "shippingType": {
                "$ref": "#/components/schemas/ShippingTypes"
              }
            }
          }
        ]
      },
      "ShippingAddress-Kount": {
        "type": "object",
        "title": "Kount Shipping Address",
        "description": "Contains shipment information including name of the person identified to receive the purchase order.",
        "required": [
          "countryCode"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseAddress"
          },
          {
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string",
                "description": "First name of the recipient.",
                "minLength": 1,
                "maxLength": 1000,
                "example": "Maya"
              },
              "middleName": {
                "type": "string",
                "description": "Middle name of the recipient.",
                "minLength": 1,
                "maxLength": 1000,
                "example": "Jose"
              },
              "lastName": {
                "type": "string",
                "description": "Last name of the recipient.",
                "minLength": 1,
                "maxLength": 1000,
                "example": "Juan"
              },
              "phone": {
                "$ref": "#/components/schemas/Phone"
              },
              "email": {
                "$ref": "#/components/schemas/Email"
              },
              "shippingType": {
                "$ref": "#/components/schemas/ShippingTypes"
              }
            }
          }
        ]
      },
      "ShippingAddress-All": {
        "type": "object",
        "title": "Shipping Address",
        "description": "Contains shipment information including name of the person identified to receive the purchase order. By default, all information are optional (i.e. use `Basic Shipping Address` specification).\nHowever, If the merchant is enabled to use Kount fraud protection, they must use `Kount Shipping Address` specification.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ShippingAddress-Basic"
          },
          {
            "$ref": "#/components/schemas/ShippingAddress-Kount"
          }
        ]
      },
      "BaseBuyer": {
        "type": "object",
        "title": "Buyer",
        "description": "Contains personal information regarding the buyer/payer of the transaction.",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "First name of the payer/buyer.",
            "minLength": 1,
            "maxLength": 1000
          },
          "middleName": {
            "type": "string",
            "description": "Middle name of the payer/buyer.",
            "minLength": 1,
            "maxLength": 1000
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the payer/buyer.",
            "minLength": 1,
            "maxLength": 1000
          },
          "birthday": {
            "type": "string",
            "format": "date",
            "description": "Birthday in [ISO 8601 / RFC 3339 full-date format](https://tools.ietf.org/html/rfc3339#section-5.6)."
          },
          "customerSince": {
            "type": "string",
            "format": "date",
            "description": "Date in [ISO 8601 / RFC 3339 full-date format](https://tools.ietf.org/html/rfc3339#section-5.6) when payer/buyer registered as a customer as per merchant's records."
          },
          "sex": {
            "$ref": "#/components/schemas/Sex"
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/BillingAddress-All"
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/ShippingAddress-All"
          }
        }
      },
      "Buyer-Basic": {
        "type": "object",
        "title": "Basic Buyer",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseBuyer"
          }
        ]
      },
      "Buyer-Kount": {
        "type": "object",
        "title": "Kount Buyer",
        "required": [
          "firstName",
          "lastName",
          "contact",
          "billingAddress",
          "shippingAddress"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseBuyer"
          }
        ]
      },
      "Buyer-All": {
        "type": "object",
        "title": "Buyer",
        "description": "Contains personal information regarding the buyer/payer of the transaction. By default, all information are optional (i.e. use `Basic Buyer` specification).\nHowever, If the merchant is enabled to use Kount fraud protection, they must use `Kount Buyer` specification.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/Buyer-Basic"
          },
          {
            "$ref": "#/components/schemas/Buyer-Kount"
          }
        ]
      },
      "RedirectUrl": {
        "type": "object",
        "title": "Redirect URLs",
        "description": "Contains a list of redirect URLs of the merchant for specific events.",
        "properties": {
          "success": {
            "type": "string",
            "format": "url",
            "description": "URL to redirect to when the payment is successfully completed."
          },
          "failure": {
            "type": "string",
            "format": "url",
            "description": "URL to redirect to when the payment fails."
          },
          "cancel": {
            "type": "string",
            "format": "url",
            "description": "URL to redirect to when the payment is cancelled by the payer/buyer."
          }
        }
      },
      "RequestReferenceNumber": {
        "title": "Merchant Request Reference Number",
        "type": "string",
        "minLength": 1,
        "maxLength": 36,
        "description": "The merchant's reference number for the transaction. It is strongly advised that the merchant provide unique value for this property for each transaction."
      },
      "AuthorizationType": {
        "title": "Authorization Type",
        "type": "string",
        "enum": [
          "NORMAL",
          "FINAL",
          "PREAUTHORIZATION"
        ],
        "description": "For card transactions, it indicates the type of authorization applied. For more information, click this [link](https://cdn.paymaya.com/sandbox/payments_api/paymayap3/paymayap3.html#header-authorization-types)."
      },
      "PaymentFacilitator": {
        "title": "Payment Facilitator",
        "type": "object",
        "description": "For a payment facilitator, this provides details regarding the sub-merchant.",
        "required": [
          "smi",
          "smn",
          "mci",
          "mpc",
          "mco"
        ],
        "properties": {
          "smi": {
            "type": "string",
            "minLength": 1,
            "maxLength": 30,
            "description": "Sub-merchant ID."
          },
          "smn": {
            "type": "string",
            "format": "alphanumeric, hyphen, space, apostrophe, comma, period, hyphen",
            "minLength": 1,
            "maxLength": 64,
            "description": "Sub-merchant name."
          },
          "mci": {
            "type": "string",
            "minLength": 1,
            "maxLength": 13,
            "description": "Sub-merchant city location."
          },
          "mpc": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "description": "[ISO 4217 Numeric](https://www.iso.org/iso-4217-currency-codes.html) currency code.\n"
          },
          "mco": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "description": "[ISO 3166 Alpha-3](https://www.iso.org/iso-3166-country-codes.html) country code.\n"
          },
          "mst": {
            "type": "string",
            "minLength": 2,
            "maxLength": 3,
            "description": "Sub-merchant abbreviated state location (required if country is USA)."
          },
          "mcc": {
            "type": "string",
            "format": "numeric",
            "minLength": 1,
            "maxLength": 15,
            "description": "[ISO 18245](https://www.iso.org/standard/33365.html) merchant category code.\n"
          },
          "postalCode": {
            "type": "string",
            "format": "alphanumeric, dash, space, hyphen, underscore",
            "maxLength": 20,
            "description": "Sub-merchant postal code"
          },
          "contactNo": {
            "type": "string",
            "format": "phone",
            "maxLength": 20,
            "description": "Contact number without spaces, dashes, or parentheses."
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Sub-merchant state location in full text."
          },
          "addressLine1": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Sub-merchant street address."
          }
        }
      },
      "Metadata": {
        "title": "Metadata",
        "type": "object",
        "description": "Used to provide additional data to the transaction such a payment faciliator information.",
        "properties": {
          "subMerchantRequestReferenceNumber": {
            "title": "Sub-merchant Request Reference Number",
            "type": "string",
            "format": "alphanumeric, dash, space, hyphen, underscore",
            "minLength": 1,
            "maxLength": 36,
            "description": "Reference number of the sub-merchant for the related transaction"
          },
          "pf": {
            "$ref": "#/components/schemas/PaymentFacilitator"
          }
        }
      },
      "AmountDetails": {
        "title": "Amount Details",
        "type": "object",
        "properties": {
          "subtotal": {
            "type": "string",
            "format": "numeric",
            "description": "Subtotal value before applying discounts or additional fees."
          },
          "discount": {
            "type": "string",
            "format": "numeric",
            "description": "Discount applied on the relevant amount value."
          },
          "serviceCharge": {
            "type": "string",
            "format": "numeric",
            "description": "Service charge applied on the relevant amount value."
          },
          "shippingFee": {
            "type": "string",
            "format": "numeric",
            "description": "Shipping fee on the relevant amount value."
          },
          "tax": {
            "type": "string",
            "format": "numeric",
            "description": "Tax on the relevant amount value."
          }
        }
      },
      "ItemAmountObject": {
        "type": "object",
        "description": "Amount details per 1 item.",
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "description": "Amount of 1 item quantity.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Amount"
              }
            ]
          },
          "details": {
            "description": "Amount breakdown of 1 item quantity.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AmountDetails"
              }
            ]
          }
        }
      },
      "ItemTotalAmountObject": {
        "type": "object",
        "description": "Amount details all quantity.",
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "description": "Amount of all quantity",
            "allOf": [
              {
                "$ref": "#/components/schemas/Amount"
              }
            ]
          },
          "details": {
            "description": "Amount breakdown of all quantity.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AmountDetails"
              }
            ]
          }
        }
      },
      "Item": {
        "title": "Item",
        "type": "object",
        "required": [
          "name",
          "totalAmount"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the item."
          },
          "quantity": {
            "type": "string",
            "format": "numeric",
            "description": "Quantity of the item."
          },
          "code": {
            "type": "string",
            "description": "Item code (e.g. stock-keepin unit code or SKU) in the merchant's inventory."
          },
          "description": {
            "type": "string",
            "description": "Additional description of the item (e.g. color, variant)"
          },
          "amount": {
            "$ref": "#/components/schemas/ItemAmountObject"
          },
          "totalAmount": {
            "$ref": "#/components/schemas/ItemTotalAmountObject"
          }
        }
      },
      "Items": {
        "type": "array",
        "description": "Contains a list of item information.\n",
        "items": {
          "$ref": "#/components/schemas/Item"
        }
      },
      "OneTimePaymentRequest": {
        "title": "Tokenized Payment Request",
        "oneOf": [
          {
            "type": "object",
            "title": "Basic Payment Request",
            "required": [
              "paymentTokenId",
              "totalAmount"
            ],
            "properties": {
              "paymentTokenId": {
                "$ref": "#/components/schemas/PaymentTokenId"
              },
              "totalAmount": {
                "$ref": "#/components/schemas/TotalAmount-Amount"
              },
              "buyer": {
                "$ref": "#/components/schemas/Buyer-All"
              },
              "redirectUrl": {
                "$ref": "#/components/schemas/RedirectUrl"
              },
              "requestReferenceNumber": {
                "$ref": "#/components/schemas/RequestReferenceNumber"
              },
              "authorizationType": {
                "$ref": "#/components/schemas/AuthorizationType"
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              }
            }
          },
          {
            "type": "object",
            "title": "Kount Payment Request",
            "required": [
              "paymentTokenId",
              "totalAmount",
              "buyer"
            ],
            "properties": {
              "paymentTokenId": {
                "$ref": "#/components/schemas/PaymentTokenId"
              },
              "totalAmount": {
                "$ref": "#/components/schemas/TotalAmount-Amount"
              },
              "buyer": {
                "$ref": "#/components/schemas/Buyer-All"
              },
              "items": {
                "$ref": "#/components/schemas/Items"
              },
              "redirectUrl": {
                "$ref": "#/components/schemas/RedirectUrl"
              },
              "requestReferenceNumber": {
                "$ref": "#/components/schemas/RequestReferenceNumber"
              },
              "authorizationType": {
                "$ref": "#/components/schemas/AuthorizationType"
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              }
            }
          }
        ]
      },
      "PaymentId": {
        "title": "Payment ID",
        "type": "string",
        "format": "uuid",
        "description": "The unique identification of the payment transaction."
      },
      "PaymentStates": {
        "title": "Payment States",
        "type": "string",
        "description": "Indicates the current state of the payment transaction.",
        "enum": [
          "PENDING_TOKEN",
          "PENDING_PAYMENT",
          "FOR_AUTHENTICATION",
          "AUTHENTICATING",
          "AUTH_NOT_ENROLLED",
          "AUTH_SUCCESS",
          "AUTH_FAILED",
          "PAYMENT_SUCCESS",
          "PAYMENT_FAILED",
          "PAYMENT_PROCESSING",
          "AUTHORIZED",
          "PAYMENT_EXPIRED",
          "PAYMENT_CANCELLED",
          "PAYMENT_INVALID",
          "VOIDED",
          "REFUNDED",
          "ACCOUNT_ABUSE",
          "CAPTURED",
          "DONE",
          "CAPTURE_HOLD_EXPIRED"
        ]
      },
      "CardScheme": {
        "type": "string",
        "enum": [
          "visa",
          "jcb",
          "master-card"
        ],
        "description": "Card scheme."
      },
      "FundSourceCard": {
        "title": "Card",
        "type": "object",
        "required": [
          "id",
          "type",
          "description"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PaymentTokenId"
          },
          "type": {
            "type": "string",
            "description": "Indicates the type of the fund source. For card transactions this is always set to `card`.",
            "example": "card"
          },
          "description": {
            "type": "string",
            "description": "Masked card PAN which *may* show the last 4 digits.",
            "example": "**** **** **** 4154"
          },
          "details": {
            "description": "Contains the more information specific to the card used.",
            "type": "object",
            "properties": {
              "scheme": {
                "$ref": "#/components/schemas/CardScheme"
              },
              "last4": {
                "type": "string",
                "format": "numeric",
                "description": "Last 4 digits of the card PAN.",
                "example": 4154
              },
              "first6": {
                "type": "string",
                "format": "numeric",
                "description": "First 6 digits of the card PAN.",
                "example": 545301
              },
              "masked": {
                "type": "string",
                "description": "Masked card PAN which *may* show the first 6 and last 4 digits.",
                "example": "545301******4154"
              },
              "issuer": {
                "$ref": "#/components/schemas/Issuer"
              }
            }
          }
        }
      },
      "FundSourcePaymaya": {
        "title": "PayMaya Account (Single Payment)",
        "type": "object",
        "required": [
          "id",
          "type",
          "description"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "phone",
            "description": "The mobile phone number (MSISDN) associated to the PayMaya account.",
            "example": "+639086216587"
          },
          "type": {
            "type": "string",
            "description": "Indicates the type of the fund source. For PayMaya transactions, this is always set to `paymaya`.",
            "example": "paymaya"
          },
          "description": {
            "type": "string",
            "description": "The formatted masked mobile phone number, which *may* show the last 4 digits.",
            "example": "***** ***6587"
          },
          "details": {
            "description": "Contains the more information specific to the PayMaya account.",
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string",
                "description": "The first name of the PayMaya account holder.",
                "example": "Maya"
              },
              "lastName": {
                "type": "string",
                "description": "The last name of the PayMaya account holder.",
                "example": "Cruz"
              },
              "msisdn": {
                "type": "string",
                "format": "phone",
                "description": "The mobile phone number (MSISDN) associated to the PayMaya account.",
                "example": "+639086216587"
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "The mobile phone number (MSISDN) associated to the PayMaya account.",
                "example": "maya.juan@mail.com"
              },
              "masked": {
                "type": "string",
                "description": "The masked mobile phone number, which *may* show the last 4 digits.",
                "example": "********6587"
              }
            }
          }
        }
      },
      "ProfileId": {
        "type": "string",
        "description": "Identification string of the PayMaya consumer account."
      },
      "FundSourcePaymayaLinkedWallet": {
        "title": "PayMaya Account (Recurring Payment)",
        "type": "object",
        "required": [
          "id",
          "type",
          "description"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PaymentTokenId"
          },
          "type": {
            "type": "string",
            "description": "Indicates the type of the fund source. For recurring PayMaya wallet transactions, this is set to `card`.",
            "example": "card"
          },
          "description": {
            "type": "string",
            "description": "Masked card PAN which *may* show the last 4 digits.",
            "example": "**** **** **** 4154"
          },
          "details": {
            "description": "Contains the more information specific to the card used.",
            "type": "object",
            "properties": {
              "scheme": {
                "$ref": "#/components/schemas/CardScheme"
              },
              "last4": {
                "type": "string",
                "format": "numeric",
                "description": "Last 4 digits of the card PAN.",
                "example": 4154
              },
              "first6": {
                "type": "string",
                "format": "numeric",
                "description": "First 6 digits of the card PAN.",
                "example": 545301
              },
              "masked": {
                "type": "string",
                "description": "Masked card PAN which *may* show the first 6 and last 4 digits.",
                "example": "545301******4154"
              },
              "issuer": {
                "$ref": "#/components/schemas/Issuer"
              },
              "profileId": {
                "$ref": "#/components/schemas/ProfileId"
              }
            }
          }
        }
      },
      "FundSourceP2m": {
        "title": "P2M",
        "type": "object",
        "required": [
          "type",
          "description"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Always set to null."
          },
          "type": {
            "type": "string",
            "description": "Indicates the type of the fund source. For PayMaya P2M transactions this is always set to `paymaya`.",
            "example": "paymaya"
          },
          "description": {
            "type": "string",
            "description": "Always set to `PayMaya Account`.",
            "example": "PayMaya Account"
          },
          "details": {
            "description": "Contains the card token used associated to the PayMaya account.",
            "type": "object",
            "properties": {
              "scheme": {
                "type": "string",
                "enum": [
                  "visa",
                  "jcb",
                  "master-card"
                ],
                "description": "Card scheme.",
                "example": "master-card"
              },
              "last4": {
                "type": "string",
                "format": "numeric",
                "description": "Last 4 digits of the card PAN.",
                "example": 4154
              },
              "first6": {
                "type": "string",
                "format": "numeric",
                "description": "First 6 digits of the card PAN.",
                "example": 545301
              },
              "masked": {
                "type": "string",
                "description": "Masked card PAN which *may* show the first 6 and last 4 digits.",
                "example": "545301******4154"
              },
              "issuer": {
                "$ref": "#/components/schemas/Issuer"
              }
            }
          }
        }
      },
      "FundSourcePaypal": {
        "title": "PayPal Account",
        "type": "object",
        "required": [
          "id",
          "type",
          "description"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "email",
            "description": "The payer's PayPal account as represented by an email address.",
            "example": "maya.juan@mail.com"
          },
          "type": {
            "type": "string",
            "description": "Indicates the type of the fund source. For PayPal transactions, this is always set to `paypal`.",
            "example": "paypal"
          },
          "description": {
            "type": "string",
            "description": "The formatted masked PayPal account (i.e. email address).",
            "example": "m*******n@mail.com"
          }
        }
      },
      "FundSource": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/FundSourceCard"
          },
          {
            "$ref": "#/components/schemas/FundSourcePaymaya"
          },
          {
            "$ref": "#/components/schemas/FundSourcePaymayaLinkedWallet"
          },
          {
            "$ref": "#/components/schemas/FundSourceP2m"
          },
          {
            "$ref": "#/components/schemas/FundSourcePaypal"
          }
        ]
      },
      "EmvIccData": {
        "title": "EMV ICC Data",
        "type": "string",
        "minLength": 1,
        "maxLength": 340,
        "description": "EMV ICC binary data returned by the Issuer. To be used for post-processing (e.g., Issuer Authentication by EMV EXTERNAL AUTHENTICATE or 2nd GENERATE AC).",
        "example": "ggIcAIQHoAAAAAMQEJUFgAAAAACaAxcEGZwBAF8qAgYInwIGAAAAAAEAnwMGAAAAAAAAnxASBgEKA6CAAAoCAAAAAABuefOZnxoCBgifHghQWU1ZUE9TMZ8mCA5/WLUnW3KxnycBgJ8zAyAgyJ80Ax4DAJ81ASGfNgIAyp83BKOXolWfQQQAAAAB"
      },
      "TransactionId": {
        "title": "Transaction ID",
        "type": "string",
        "description": "Unique identifier returned by the issuer for this transaction.",
        "example": "OUWZP6"
      },
      "ApprovalCode": {
        "title": "Approval Code",
        "type": "string",
        "description": "Approval Code / Authorization Identification Code generated by the issuer to indicate the approval of a transaction",
        "example": 873200
      },
      "BatchNo": {
        "title": "Processor Batch Number",
        "type": "string",
        "format": "alphanumeric",
        "minLength": 1,
        "maxLength": 8,
        "description": "Value supplied by P3 or the value of `transaction.trace.batchNo` during the request (if supplied) which indicates the batch of transactions that the specific transaction has been grouped with. Merchants may keep track of this value for reconnaissance.",
        "example": 20210506
      },
      "TraceNo": {
        "title": "Processor Trace Number",
        "type": "string",
        "format": "alphanumeric",
        "minLength": 1,
        "maxLength": 8,
        "description": "Value of `transaction.trace.traceNo` during the request (if supplied)"
      },
      "ReceiptNo": {
        "title": "Receipt Number",
        "type": "string",
        "format": "alphanumeric",
        "minLength": 1,
        "maxLength": 12,
        "description": "A receipt / reference number generated by the acquirer. Can be used by all parties (cardholder merchant payment gateway acquirer issuer) when looking up a specific transaction record for reconnaisance.",
        "example": 112612964976
      },
      "Receipt": {
        "title": "Processor Receipt",
        "type": "object",
        "description": "Additional transaction reference numbers generated by either the issuing bank or the acquiring host. This is only relevant for card and PayMaya Account payments.",
        "properties": {
          "transactionId": {
            "$ref": "#/components/schemas/TransactionId"
          },
          "approvalCode": {
            "$ref": "#/components/schemas/ApprovalCode"
          },
          "batchNo": {
            "$ref": "#/components/schemas/BatchNo"
          },
          "traceNo": {
            "$ref": "#/components/schemas/TraceNo"
          },
          "receiptNo": {
            "$ref": "#/components/schemas/ReceiptNo"
          }
        }
      },
      "PaymentResponse": {
        "title": "Generic Payment Response",
        "type": "object",
        "required": [
          "id",
          "isPaid",
          "status",
          "amount",
          "currency",
          "canVoid",
          "canRefund",
          "canCapture",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PaymentId"
          },
          "isPaid": {
            "type": "boolean",
            "description": "Indicates if the payment is processed successfully or not."
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStates"
          },
          "amount": {
            "$ref": "#/components/schemas/Amount"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "canVoid": {
            "type": "boolean",
            "description": "Indicates if the payment can be voided (e.g. same-day reversal for card transactions)."
          },
          "canRefund": {
            "type": "boolean",
            "description": "Indicates if the payment can be refunded (e.g. next-day reversal for card transactions)."
          },
          "canCapture": {
            "type": "boolean",
            "description": "Indicates if the payment can be captured for settlement to merchant. This is only relevant for authorization payments."
          },
          "createdAt": {
            "$ref": "#/components/schemas/CreatedAt"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/UpdatedAt"
          },
          "requestReferenceNumber": {
            "$ref": "#/components/schemas/RequestReferenceNumber"
          },
          "description": {
            "title": "Customer/Payer Description",
            "type": "string",
            "description": "Contains identifying information regarding the payer of the transaction. It may contain the payer's email address, name, or address line.",
            "example": "Charge for maya.juan@mail.com"
          },
          "paymentTokenId": {
            "$ref": "#/components/schemas/PaymentTokenId"
          },
          "verificationUrl": {
            "title": "3DS Verification URL",
            "type": "string",
            "format": "url",
            "description": "The URL that the payer needs to open in the browser to complete payment via 3DS authentication."
          },
          "fundSource": {
            "$ref": "#/components/schemas/FundSource"
          },
          "batchNumber": {
            "title": "Terminal Batch Number",
            "type": "string",
            "format": "alphanumeric, dash, space, hyphen, underscore",
            "minLength": 1,
            "maxLength": 36,
            "description": "The batch number of a terminal-based payment."
          },
          "traceNumber": {
            "title": "Terminal Trace Number",
            "type": "string",
            "format": "alphanumeric, dash, space, hyphen, underscore",
            "minLength": 1,
            "maxLength": 36,
            "description": "The batch number of a terminal-based payment."
          },
          "emvIccData": {
            "$ref": "#/components/schemas/EmvIccData"
          },
          "receipt": {
            "$ref": "#/components/schemas/Receipt"
          },
          "approvalCode": {
            "$ref": "#/components/schemas/ApprovalCode"
          },
          "receiptNumber": {
            "$ref": "#/components/schemas/ReceiptNo"
          },
          "authorizationType": {
            "$ref": "#/components/schemas/AuthorizationType"
          },
          "capturedAmount": {
            "type": "number",
            "format": "float",
            "description": "Indicates the total amount already captured for this authorization payment. Only applicable if the transaction has an `authorizationType`."
          },
          "authorizationPayment": {
            "title": "Authorization Payment ID",
            "type": "string",
            "format": "uuid",
            "description": "The unique identification of the authorization payment associated to this payment. Only applicable if this is a capture payment."
          },
          "capturedPaymentId": {
            "title": "Capture Payment ID",
            "type": "string",
            "format": "uuid",
            "description": "The unique identification of the capture payment associated to this payment. Only applicable if this is an authorization payments."
          },
          "subscription": {
            "title": "Subscription ID",
            "type": "string",
            "format": "uuid",
            "description": "The unique identification of the subscription associated to this payment."
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      }
    },
    "examples": {
      "OneTimePaymentRequest": {
        "summary": "One-time payment request.",
        "value": {
          "paymentTokenId": "0zjacza65HEobriYGN9g5XwaWZYVSeErdNnaNCLCo8QvUXuGg49KPJSy1XbhHPL8OisYOiYPJSQ2BxqR2AuC682Yu5G5LzrU0SK6ByWi0TyhkekWf1ssl6cMBWAVAOdArLcY1QXEyHdr8EsRAS2bHeMEpUU6OSmxmky5Fk",
          "totalAmount": {
            "amount": 100,
            "currency": "PHP"
          },
          "buyer": {
            "firstName": "Maya",
            "lastName": "Juan",
            "contact": {
              "phone": "+63(2)1234567890",
              "email": "maya.juan@mail.com"
            },
            "shippingAddress": {
              "line1": "6F Launchpad",
              "line2": "Sheridan Street",
              "city": "Mandaluyong City",
              "state": "Metro Manila",
              "zipCode": "1552",
              "countryCode": "PH",
              "firstName": "John",
              "lastName": "Doe",
              "phone": "+63(2)1234567890",
              "email": "john.doe@mail.com",
              "shippingType": "SD"
            },
            "billingAddress": {
              "line1": "6F Launchpad",
              "line2": "Sheridan Street",
              "city": "Mandaluyong City",
              "state": "Metro Manila",
              "zipCode": "1552",
              "countryCode": "PH"
            }
          },
          "requestReferenceNumber": "1626084179",
          "redirectUrl": {
            "success": "https://www.merchantsite.com/success",
            "failure": "https://www.merchantsite.com/failure",
            "cancel": "https://www.merchantsite.com/cancel"
          }
        }
      },
      "OneTimePaymentResponse": {
        "summary": "One-time payment response.",
        "value": {
          "id": "7ea1f6ef-035c-4fcd-85e0-037c8d9d4a2c",
          "isPaid": false,
          "status": "FOR_AUTHENTICATION",
          "amount": "100",
          "currency": "PHP",
          "canVoid": false,
          "canRefund": false,
          "canCapture": false,
          "createdAt": "2021-07-12T10:02:55.000Z",
          "updatedAt": "2021-07-12T10:02:55.000Z",
          "description": "Charge for maya.juan@mail.com",
          "paymentTokenId": "0zjacza65HEobriYGN9g5XwaWZYVSeErdNnaNCLCo8QvUXuGg49KPJSy1XbhHPL8OisYOiYPJSQ2BxqR2AuC682Yu5G5LzrU0SK6ByWi0TyhkekWf1ssl6cMBWAVAOdArLcY1QXEyHdr8EsRAS2bHeMEpUU6OSmxmky5Fk",
          "requestReferenceNumber": "1626084179",
          "verificationUrl": "https://payments-web-sandbox.paymaya.com/authenticate?id=7ea1f6ef-035c-4fcd-85e0-037c8d9d4a2c"
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
````