---
updatedAt: 2026-10-26T12:32:39.000Z
---

# One-time straight payment

# How to Integrate

## 1 Obtain your API Keys

[block:html]
{
  "html": "<blockquote class=\"callout callout_info\">\n  <p>\n    <span class=\"callout-icon\">ℹ️</span>\n    If you already have your <b>API keys</b> and know how to use it, you may proceed to the next step.\n  </p>\n</blockquote>"
}
[/block]

The Payments Processing Platform APIs uses API keys to authenticate requests. API keys carry many privileges, your grant or permission to access and integrate with Maya’s endpoints.

[block:html]
{
  "html": "<div class=\"boxed\">\n  <p><b>Step 1:</b> Prepare your Public GPG Keys to be submitted to Maya. Don’t have keys yet? <a href=\"/docs/gpg-guide\" target=\"_blank\">Learn How <img src=\"https://files.readme.io/375c385-redirect.png\" style=\"width:12px; height:12px;\"/></a></p>\n  <p><b>Step 2:</b> Provide email address of the nominated recipient of the <code>API Keys</code>.</p>\n  <p><b>Step 3:</b> Credentials and keys will be received via an encrypted email. You should be able to decrypt it using your public and private GPG keys.</p>\n</div>"
}
[/block]

[block:html]
{
  "html": "<blockquote class=\"callout callout_note\">\n  <p>\n    <span class=\"callout-icon\">📖</span>\n    Different API keys will be provided for each environment: <b>Sandbox</b> or <b>Production</b>.\n  </p>\n</blockquote>"
}
[/block]

### Authenticating with our API

Authentication is done via **HTTP Basic Authentication**. Depending on the API endpoint, the **public (pk-....)** or **secret (sk-....)** key must be provided as the username and the password left as blank.

#### Steps are as follows:

1. Combine Username and Password (left blank) separated by ‘:’ (colon). If your API key is “pk-Z0OSzLvIcOI2UIvDhdTGVVfRSSeiGStnceqwUE7n0Ah”, the resulting string is:

```
pk-Z0OSzLvIcOI2UIvDhdTGVVfRSSeiGStnceqwUE7n0Ah:
```

2. Apply Base64 encoding to the resulting string from Step 1. Using the resulting string from Step 1, the Base64 encoded string will be:

```
cGstWjBPU3pMdkljT0kyVUl2RGhkVEdWVmZSU1NlaUdTdG5jZXF3VUU3bjBBaDo=
```

3. Indicate the authorization method i.e. “Basic” followed by a space then the Base64 encoded string in Step 2. An example is shown below.

```
Authorization: Basic cGstWjBPU3pMdkljT0kyVUl2RGhkVEdWVmZSU1NlaUdTdG5jZXF3VUU3bjBBaDo=
```

[block:html]
{
  "html": "<p>\n  <b>See also:</b> <a href=\"https://en.wikipedia.org/wiki/Basic_access_authentication\" target=\"_blank\">HTTP Basic Auth <img src=\"https://files.readme.io/375c385-redirect.png\" style=\"width:12px; height:12px;\"/></a>\n</p>"
}
[/block]

## 2 Create Straight Payment

[block:html]
{
  "html": "<a href=\"/reference/pay\" target=\"_blank\" style=\"text-decoration:none;\">\n  <div class=\"genericDiv\">\n    <span class=\"methodPost\">POST</span> /p3/pay  <img src=\"https://files.readme.io/375c385-redirect.png\" style=\"width:12px; height:12px;\"/>\n  </div>\n</a>"
}
[/block]

[block:html]
{
  "html": "<blockquote class=\"callout callout_okay\" theme=\"🧩\">\n  <h3>\n    <span class=\"callout-icon\">🧩</span>\n\t\tTips\n  </h3>\n  \n  <p>\n    It is <b>highly recommended</b> that you perform the <b>3D Secure or 3D Secure 2</b> (3DS or 3DS2) authentication to increase your success rate and prevent transaction from getting declined by the issuing banks.\n  </p>\n  <p>\n    You will be responsible for performing the <b>3D Secure or 3D Secure 2</b> (3DS or 3DS2) authentication leg, including, but not limited to, integrating with its own or a 3rd party <b>Merchant Plug-in (MPI)</b>. \n  </p>\n</blockquote>"
}
[/block]

Use this endpoint and provide basic payment details when performing a straight payment.

* A successful straight payment request will generate a `paymentTransactionReferenceNo`.
* Successful straight payment will be processed for clearing and settlement on the next cut-off schedule.

![](https://files.readme.io/32046d1-P3_pay.png)

Funding instrument must be set to indicate the type of source of funds or where payment will be charged. Payments Processing Platform currently supports `fundingInstrument`: <span style="color:#4929AA; font-weight:bold;">CARD</span>

**When card is used**, you need to indicate the account type and card type where the transaction should be charged.

[block:html]
{
  "html": "<table>\n  <tr>\n    <th rowspan=\"2\"><b>ACCOUNT TYPE</b>\n<br>\n      (Customer’s account type linked to the card)</th>\n    <th colspan=\"2\"><b>CARD TYPE</b>\n<br>\n      (Type of the card used at the point-of-sale)</th>\n  </tr>\n  <tr>\n    <td style=\"text-align: center;\"><b>DEBIT</td>\n    <td style=\"text-align: center;\"><b>CREDIT</td>\n  </tr>\n  <tr>\n    <td style=\"text-align: center;\"><b>Default</td>\n    <td style=\"text-align: center;\"><b>✅</td>\n    <td style=\"text-align: center;\"><b>✅</td>\n  </tr>\n  <tr>\n    <td style=\"text-align: center;\"><b>Savings</td>\n    <td style=\"text-align: center;\"><b>✅</td>\n    <td style=\"text-align: center;\"><b></td>\n  </tr>\n  <tr>\n    <td style=\"text-align: center;\"><b>Current</td>\n    <td style=\"text-align: center;\"><b>✅</td>\n    <td style=\"text-align: center;\"><b></td>\n  </tr>\n    <tr>\n    <td style=\"text-align: center;\"><b>Credit</td>\n    <td style=\"text-align: center;\"><b></td>\n    <td style=\"text-align: center;\"><b>✅</td>\n  </tr>\n</table>"
}
[/block]

##### For E-commerce

<section>
<details class="genericExpand">
<summary class="overview-expand">Click to see full details</summary>
<br>

Maya’s **Payments Processing Platform** supports authorizations for **3D Secure or 3D Secure 2** (3DS or 3DS2) authenticated e-commerce transactions. You may specify the result of the authentication in the `threeDSecure` object (by providing the verification token) to complete an authenticated transaction.

```json
"threeDSecure": 
{
      "verificationToken": "jqEmJkhI2+SDCAAAAAAJBwAAAAA=",
      "eci": "05",
      "enrolled": "Y",
      "authenticationStatus": "Y"
}
```

</section>
</details>

##### For Card-present

<section>
<details class="genericExpand">
<summary class="overview-expand">Click to see full details</summary>
<br>

Card-present transactions supports the following card entry methods:

* EMV: Contact Chip (Integrated-Circuit Card)
* EMV: Contactless Chip (Integrated-Circuit Card)
* Magnetic Stripe
* Contactless Magnetic Stripe

[block:html]
{
  "html": "<blockquote class=\"callout callout_info\">\n  <h3>\n    <span class=\"callout-icon\">ℹ️</span>\n\t\tEMV (chip-based) transactions\n  </h3> \n  <p>\n    For chip-based requests, the <code>emvIccData</code> contains the <code>Base64</code> encoded value of the binary TLV chip data read from the card. For example, for the following TLV data:\n    <br>\n    <br>\n    \t<code>82021C008407A0000000031010950580000000009A031704199C01005F2A0206089F02060000000001009F03060000000000009F1012060A0A03A080000A0200000000006E79F3999F1A0206089F1E0850594D59504F53319F26080E7F58B5275B72B19F2701809F33032020C89F34031E03009F3501219F360200CA9F3704A397A2559F4104000000019F6E0420000000</code>\n  \t<br>\n    <br>\n    The resulting <code>emvIccData</code> should be:\n    <br>\n     <br>\n    <code>ggIcAIQHoAAAAAMQEJUFgAAAAACaAxcEGZwBAF8qAgYInwIGAAAAAAEAnwMGAAAAAAAAnxASBgoKA6CAAAoCAAAAAABuefOZnxoCBgifHghQWU1ZUE9TMZ8mCA5/WLUnW3KxnycBgJ8zAyAgyJ80Ax4DAJ81ASGfNgIAyp83BKOXolWfQQQAAAABn24EIAAAAA==</code>\n  </p>\n</blockquote>"
}
[/block]

</section>
</details>

#### Initiator and Intent

You can indicate the **initiator** and the **intent** of the transaction in the **Straight Payment** requests. The value in these fields may be used by Issuers when determining the approval status of an authorization transaction.

[block:html]
{
  "html": "<blockquote class=\"callout callout_note\" theme=\"📖\">\n  <p>\n    <span class=\"callout-icon\">📖</span>\n    <b>Recurring transactions</b> (i.e., </code>transaction.frequencyIndicator</code> = <code>RECURRING</code>)\n\t<br>\n\t<br> \n    These transactions will be treated as <b>merchant-initiated</b> transactions, regardless of the value of <code>transaction.initiator</code>.\n  </p>\n</blockquote>"
}
[/block]

##### INITIATOR (`transaction.initiator`)

<section>
<details class="genericExpand">
<summary class="overview-expand">Click to see full details</summary>
<br>

The **transaction initiator** is **the entity that initiated the authorization request**. The following initiators are supported by the API:

[block:html]
{
  "html": "<blockquote class=\"callout callout_mind\">\n  <h3>\n    <span class=\"callout-icon\">🧠</span>\n\t\tKeep in mind\n  </h3>\n  <p>\n    <b>By default</b>, transaction is treated as <code>CONSUMER</code> initiated <b>if initiator was not specified</b>.\n  </p>\n</blockquote>\n\n<table>\n  <tr>\n    <td><code>CONSUMER</code><span class=\"statusDefault\">DEFAULT</span></td>\n    <td>Indicates that transaction is <b>consumer initiated</b> (e.g., consumer explicitly purchased an item from the merchant)</td>\n  </tr>\n  <tr>\n    <td><code>MERCHANT</code></td>\n    <td>Indicates that transaction is <b>merchant initiated</b> (e.g., charging subsequent miscellaneous fees after the original transaction)</td>\n  </tr>\n</table>\n"
}
[/block]

</section>
</details>

##### INTENT (`transaction.intent`)

<section>
<details class="genericExpand">
<summary class="overview-expand">Click to see full details</summary>
<br>

**Transaction intent** is **a general description of the purpose of the authorization request**. The following intents are supported by the API:

[block:html]
{
  "html": "<blockquote class=\"callout callout_mind\">\n  <h3>\n    <span class=\"callout-icon\">🧠</span>\n\t\tKeep in mind\n  </h3>\n  <p>\n    <b>If intent is not specified</b>, transaction will be, <b>by default</b>, intended for <code>PAYMENT</code>.\n  </p>\n</blockquote>\n\n<table>\n  <tr>\n    <td><code>PAYMENT</code><span class=\"statusDefault\">DEFAULT</span></td>\n    <td>Indicates that the authorization request is being done to collect payment from the consumer for goods/services rendered.</td>\n  </tr>\n  <tr>\n    <td><code>VAULTING</code></td>\n    <td>Indicates that the request intends to store the consumer’s credentials after a successful authorization. \n      <br><br>\n\t\t\t\tNormally, authorizations with the VAULTING intent are voided/refunded afterwards, as the results are only used for validating the consumer’s credentials. \n\t\t\t<br><br>\n      This <b>value should be set</b> even if the client intends to collect payment from the authorization request as well, as long as the client intends to store the credentials afterwards.\n    </td>\n  </tr>\n</table>"
}
[/block]

</section>
</details>

#### Reference Numbers

The following reference numbers can be set to provide additional tagging for each transaction during reconciliation processes:

<section>
<details class="genericExpand">
<summary class="overview-expand">In Request Header</summary>
<br>

[block:html]
{
  "html": "<table>\n  <td style=\"padding: 20px;\">\n    <h4>\n    \t<code>Request-Reference-No</code><span class=\"statusRequired\">REQUIRED</span>\n  \t</h4>\n    <p>\n      A reference number sent by the <b>API caller</b> to tag the transaction in Payments Processing Platform.\n    </p>\n  </td>\n</table>"
}
[/block]

</section>
</details>

<section>
<details class="genericExpand">
<summary class="overview-expand">In Request Body</summary>
<br>

[block:html]
{
  "html": "<table>\n  <tr>\n    <td style=\"padding: 20px;\">\n      <h4>\n        <code>merchant.metadata.refNo</code><span class=\"statusOptional\">OPTIONAL</span>\n      </h4>\n      <p>\n        A reference number sent by the <b>merchant</b> involved in the transaction.\n        <br>\n        <br>\n          ℹ️ If the <b>API caller</b> is a merchant, this field can be populated with the same value as the <code>Request-Reference-No</code>, or omitted in favor of the value of <code>Request-Reference-No</code>.\n        <br>\n        <br>\n          ℹ️ Payment Gateways can use this field to include the reference number sent by their transacting merchant to identify the transaction.\n      </p>\n    </td>\n  </tr>\n  \n  <tr>\n    <td style=\"padding: 20px;\">\n      <h4>\n        <code>merchant.paymentFacilitator.subMerchants[0].metadata.refNo</code><span class=\"statusOptional\">OPTIONAL</span>\n      </h4>\n      <p>\n          A reference number sent by the sub-merchant involved in a transaction sent by a payment facilitator.\n      </p>\n    </td>\n  </tr>\n</table>"
}
[/block]

</section>
</details>

[block:html]
{
  "html": "<div class=\"genericDiv\">\n  <h3>\n  Using Vaulted/Stored Credentials\n  </h3>\n  \t<p>\n\t\t\tVaulted card transaction no longer contains the card security code (CSC). However, Issuers may decline transactions more often due to the lack of a <b>secondary authentication mechanism</b> (since both <b>3D Secure or 3D Secure 2</b> (3DS or 3DS2), and <b>CSC validation</b> are no longer performed).\n  \t</p>\n  \n  \n  <blockquote class=\"callout callout_okay\" theme=\"🧩\">\n  \t<h3>\n    \t<span class=\"callout-icon\">🧩</span>\n\t\t\tTips\n\t</h3>\n        <p>\n          Indicate that the credit card information of the transaction came from its storage by setting <code>payer.fundingInstrument.card.vaulted</code> to <code>true</code>.\n          <br>\n          <br>\n\t\t\t\t\tThis will help relax the acceptance requirements of issuers, since it is assumed that you have already previously authenticated the cardholder by different means.\n        </p>\n\t</blockquote>\n</div>"
}
[/block]

## *Conditional* Void and Refund

[block:html]
{
  "html": "<blockquote class=\"callout callout_warn\">\n  <p>\n    <span class=\"callout-icon\">⚠️</span>\n    Transaction retains only up to a period of <code>90 days</code> in its <b>Sandbox</b> environment and <code>390 days</code> in its <b>Production</b> environment.\n  </p>\n</blockquote>"
}
[/block]

### Void Transaction

[block:html]
{
  "html": "<a href=\"/reference/void\" target=\"_blank\" style=\"text-decoration:none;\">\n  <div class=\"genericDiv\">\n    <span class=\"methodPost\">POST</span> /p3/void  <img src=\"https://files.readme.io/375c385-redirect.png\" style=\"width:12px; height:12px;\"/>\n  </div>\n</a>"
}
[/block]

Use this endpoint to void a successful transaction providing the `paymentTransactionReferenceNo` generated during creation of straight payment.

[block:html]
{
  "html": "<blockquote class=\"callout callout_mind\">\n  <h3><span class=\"callout-icon\">🧠</span>Keep in mind</h3>\n  <p>\n    You can only <b>void</b> straight payment done <b>on or before</b> <code>11:59:59 PM</code> <b>(PH Standard Time)</b> cut-off of the same day as transaction date, otherwise <b>refund</b> is your option.\n  </p>\n</blockquote>"
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/a4f1591-P3_void.png",
        null,
        ""
      ],
      "align": "center",
      "sizing": "60% "
    }
  ]
}
[/block]

[block:html]
{
  "html": "<blockquote class=\"callout callout_info\">\n  <p><span class=\"callout-icon\">ℹ️</span>\n    In case a response is not received by the API client (e.g., timeout or connectivity error occurred), the client may send a void request with the following fields from the previous purchase request:\n  </p>\n  <ul>\n    <li><code>paymentRequestReferenceNo</code></li>\n    <li><code>merchantId</code></li>\n    <li><code>amount</code></li>\n  </ul>\n  <p>\n    However, if<code>paymentTransactionReferenceNo</code> is already provided, the fields above are ignored.\n  </p>\n</blockquote>"
}
[/block]

### Refund Transaction

[block:html]
{
  "html": "<a href=\"/reference/refund\" target=\"_blank\" style=\"text-decoration:none;\">\n  <div class=\"genericDiv\">\n    <span class=\"methodPost\">POST</span> /p3/refund  <img src=\"https://files.readme.io/375c385-redirect.png\" style=\"width:12px; height:12px;\"/>\n  </div>\n</a>"
}
[/block]

Use this endpoint to refund straight payment

[block:html]
{
  "html": "<blockquote class=\"callout callout_mind\">\n  <h3><span class=\"callout-icon\">🧠</span>Keep in mind</h3>\n  <p>\n    You can only <b>refund</b> straight payment <b>after</b> the <code>11:59:59 PM</code> <b>(PH Standard Time)</b> cut-off, otherwise, use <b>void</b>.\n  </p>\n</blockquote>"
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/387688a-P3_refund.png",
        null,
        ""
      ],
      "align": "center",
      "sizing": "60% "
    }
  ]
}
[/block]

### Clients can perform either full or partial refunds.

#### Full Refunds

* You just need to provide the `transactionReferenceNo` of the transaction to refund the full amount.

#### Partial Refunds

* You need to provide `transactionReferenceNo` and the `amount` to be refunded. You may continue to send partial refund requests until the entire amount for the transaction has been refunded.

[block:html]
{
  "html": "<blockquote class=\"callout callout_info\">\n  <p><span class=\"callout-icon\">ℹ️</span>\n    You can do multiple and partial refunds for a straight payment, as long as the total refund amount does not exceed the full amount of the transaction.\n  </p>\n</blockquote>"
}
[/block]

## 3 Test your Work

[block:html]
{
  "html": "<p>\n  Test your services by simulating transactions in our <b>sandbox</b> environment. You may use the test accounts available in <a href=\"/reference/payments-processing-platform-sandbox-creds-cards\" target=\"_blank\"> Sandbox Test Credentials and Cards <img src=\"https://files.readme.io/375c385-redirect.png\" style=\"width:12px; height:12px;\"/></a>.\n</p>\n\n\n<blockquote class=\"callout callout_okay\">\n  <h3><span class=\"callout-icon\">🧩</span>Tips</h3>\n  <p>\n    Use the <a href=\"/docs/payments-processing-platform-other-useful-endpoints#transaction-inquiry\" target=\"_blank\">Transaction Inquiry endpoints <img src=\"https://files.readme.io/375c385-redirect.png\" style=\"width:12px; height:12px;\"/></a> to track and monitor your transactions.\n  </p>\n</blockquote>"
}
[/block]

<div class="note-yellow" style="background-color: #fdfaf0">

If you're experiencing **server errors** or **timeouts**, check the <a href="/page/sandbox-health" target="\_blank" style="text-decoration:none;">**Sandbox Health Page** <img class="icon-redirect"/></a> for real-time updates on service status. If an outage is indicated, rest assured that our team is already on it, working to restore services as soon as possible.

</div>