PayMaya Direct API Reference
Each API requires Basic Authentication using PayMaya provided keys.
Features ¶
Payment Facilitator
For a payment facilitator account, some information are required to identify payment transactions to the correct sub-merchant. This set of information is passed in the metadata field of the payment or wallet link creation request.
The following shows a sample payment facilitator metadata content:
"metadata": {
"subMerchantRequestReferenceNumber": "SUBMER-12345",
"pf": {
"smi": "SUB034221",
"smn": "Maya Merchant",
"mci": "MANILA",
"mpc": "608",
"mco": "PHL",
"mcc": "3415",
"postalCode": "1001"
"contactNo": "+6329112345"
"state": "Metro Manila"
"addressLine1": "Quezon Boulevard, Quiapo"
}
}
The specifications of the each field is shown in the table below:
Field Name | Data Type | Specification | Required | Description |
---|---|---|---|---|
subMerchantRequestReferenceNumber | String | Alphanumeric (may contain dash, hyphen or underscore). Length: 1-36 | False | Reference number of the sub-merchant for the related transaction |
smi | String | Length: 1-15 | True | Sub-merchant ID |
smn | String | Length: 1-9 | True | Sub-merchant name |
mci | String | Length: 1-13 | True | Sub-merchant city location |
mpc | String | Length: 3 | True | Sub-merchant country code in (numeric format) |
mco | String | ISO 3166-1 alpha-3 code | True | Sub-merchant country code in (alpha-3 format) |
mst | String | Length: 2-3 | False | Sub-merchant abbreviated state location (required if country is US) |
mcc | String | Numeric. Should end with “1” or “15”. Length: 1-15 | False | Sub-merchant merchant category code |
postalCode | String | Max lenght: 20 | False | Sub-merchant postal code |
contactNo | String | Max lenght: 20 | False | Contact number without spaces, dashes, or parentheses |
state | String | Length: 1-100 | False | Sub-merchant state location in full text |
addressLine1 | String | Length: 1-100 | False | Sub-merchant street address |
Webhook Support
The PayMaya Payment Vault supports webhooks. A webhook (also called a web callback) is a way for an application to provide other applications with real-time information. With webhooks, PayMaya sends out payment-related information to the Merchant’s set of provided URLs for internal processing/audit.
The table below lists down the webhook names for PayMaya wallet payments listed according to the status of the payment transaction:
Webhook name | Payment status |
---|---|
PAYMENT_SUCCESS | PAYMENT_SUCCESS |
PAYMENT_FAILED | PAYMENT_FAILED |
PAYMENT_EXPIRED | PAYMENT_EXPIRED |
A sample payload for a webhook looks like the following below:
{
"id": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"isPaid": true,
"status": "PAYMENT_SUCCESS",
"amount": "100",
"currency": "PHP",
"createdAt": "2018-09-26T08:37:16Z",
"updatedAt": "2018-09-26T08:39:17Z",
"requestReferenceNumber": "6319921",
"receiptNumber":"703717440845",
"canVoid": true,
"canRefund": false
}
Merchants may specify their callback URLs through this guide here.
Idempotency
Payment Gateway APIs support optional idempotency for retransmissions. An idempotent operation is an operation, action, or request that can be applied multiple times without changing the result, i.e. the state of the system, beyond the initial application. This comes in handy during network failures, or any recoverable system failures that the client may encounter. When a request fails due to a network issue, you can just resend the request with the same idempotency key and you will get the result of the first one.
The idempotency key can be set by adding the following HTTP request header:
X-Idempotency-Key: <idempotency-key>
Where <idempotency-key>
is any client-assigned string value. The client is expected to assign a unique value to the idempotency key for any unique transaction requested. When sending retransmissions, resend the request with the same idempotency key to retrieve the response from the previous request.
When an idempotency key is provided in the header, The API will check first if the request is a first transmission, or a retransmission.
-
For first transmissions, processing proceeds as normal
-
For retransmissions, the response of the corresponding first transmission is returned, given that all the following parameters match between the first transmission, and the retransmission:
- Requesting party (identified by the API key)
- Request HTTP method
- Request URL
- Idempotency Key
In the case that a retransmission is sent while a first transmission is still ongoing, the API will wait for the completion of the first transmission, and respond back to both the first transmission and the retransmission requests with the same response.
One of the basic application of idempotency is to prevent double-charging. This is the API for Execute Recurring Payment with idempotency:
REQUEST
Headers
Content-Type: application/json
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
X-Idempotency-Key: 26e50ccb-b3f0-4dde-8061-2353585e872d
Body
{
"totalAmount": {
"currency": "PHP",
"value": 100
},
"requestReferenceNumber": "567834590",
"metadata": {}
}
Sending this request twice without idempotency key will charge the customer twice. But when the idempotency key is provided, the user will be charged only once until the cached response expires, regardless of how many times it is called, provided the same idempotency key is sent on the subsequent requests.
The idempotency key is not required. When not provided, the request wouldn’t be idempotent and the response wouldn’t be cached.
Wallet Payment ¶
The following specifications list down the APIs that can be used to perform Single Payment and Recurring Payment using PayMaya accounts.
In order to integrate with our sandbox environment and test the APIs, the following test credentials are provided for both the merchant and the payer/user.
Test Credentials
NOTE: The following API keys are used for Basic Authorization. For information how to perform this, refer to this link.
API Merchant Keys
For a payment facilitator merchant:
-
Public Key: pk-rpwb5YR6EfnKiMsldZqY4hgpvJjuy8hhxW2bVAAiz2N
-
Secret Key: sk-6s9dwnYGFJdZOYu1HCUAfUZctWEf9AjtHIG38kezX8W
For a non-payment facilitator merchant:
-
Public Key: pk-MOfNKu3FmHMVHtjyjG7vhr7vFevRkWxmxYL1Yq6iFk5
-
Secret Key: sk-NMda607FeZNGRt9xCdsIRiZ4Lqu6LT898ItHbN4qPSe
PayMaya User Account
-
Username: 09193890579
-
Password: Password123
-
OTP: 123456
Single Payment ¶
Create Single PaymentPOST/payby/v2/paymaya/payments
KEY TYPE: PUBLIC
Creates a single payment transaction using a PayMaya account.
The API returns a redirect URL that user must view in a web browser to proceed with the payment transaction.
The redirect URLs are used to go back to merchant’s server after the payment has been processed depending on the status, as shown in the request body.
The metadata is used to add payment facilitator information, as indicated in this section.
NOTE: The following is a sample request. To test this API, please use a test credential found here.
Example URI
Headers
Content-Type: application/json
Authorization: Basic cGstTU9mTkt1M0ZtSE1WSHRqeWpHN3Zocjd2RmV2UmtXeG14WUwxWXE2aUZrNTo=
Body
{
"totalAmount": {
"currency": "PHP",
"value": "100.00"
},
"redirectUrl": {
"success": "http://shop.someserver.com/success?id=6319921",
"failure": "http://shop.someserver.com/failure?id=6319921",
"cancel": "http://shop.someserver.com/cancel?id=6319921"
},
"requestReferenceNumber": "6319921",
"metadata": {}
}
200
Headers
Content-Type: application/json
Body
{
"paymentId": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"redirectUrl": "https://web-payby-sandbox.paymaya.com/paymaya/payment?id=5f1e1df5-b58f-481b-89cb-8dd41afcf771"
}
Recurring Payment ¶
Create Wallet LinkPOST/payby/v2/paymaya/link
KEY TYPE: PUBLIC
Creates a wallet link that allows charging to a PayMaya account.
The redirect URLs are used to go back to merchant’s server after the link has been processed depending on the status, as shown in the request body.
The metadata is used to add payment facilitator information, as indicated in this section.
NOTE: The following is a sample request. To test this API, please use a test credential found here.
Example URI
Headers
Content-Type: application/json
Authorization: Basic cGstTU9mTkt1M0ZtSE1WSHRqeWpHN3Zocjd2RmV2UmtXeG14WUwxWXE2aUZrNTo=
Body
{
"redirectUrl": {
"success": "http://shop.someserver.com/success?id=6319921",
"failure": "http://shop.someserver.com/failure?id=6319921",
"cancel": "http://shop.someserver.com/cancel?id=6319921"
},
"requestReferenceNumber": "6319921",
"metadata": {}
}
200
Headers
Content-Type: application/json
Body
{
"linkId": "1bbe9edd-0732-405f-93a1-1b5938de3fa0",
"redirectUrl": "https://web-payby-sandbox.paymaya.com/paymaya/link?id=1bbe9edd-0732-405f-93a1-1b5938de3fa0"
}
Execute Recurring PaymentPOST/payby/v2/paymaya/link/{link_id}/execute
KEY TYPE: SECRET
Used to executes a payment transaction using an established wallet link.
The metadata is used to add payment facilitator information, as indicated in this section.
NOTE: The following is a sample request. To test this API, please use a test credential found here.
Example URI
- link_id
string
(required) Example: 1bbe9edd-0732-405f-93a1-1b5938de3fa0Uniquely identifies a PayMaya wallet in the payment system. Format: UUIDv4.
Headers
Content-Type: application/json
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
Body
{
"totalAmount": {
"currency": "PHP",
"value": 100
},
"requestReferenceNumber": "567834590",
"metadata": {}
}
200
Headers
Content-Type: application/json
Body
{
"id": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"isPaid": true,
"status": "PAYMENT_SUCCESS",
"amount": "100.00",
"currency": "PHP",
"createdAt": "2018-06-29T04:57:04Z",
"updatedAt": "2018-06-29T04:58:04Z",
"receiptNumber": "12345",
"requestReferenceNumber": "567834590",
"canVoid": true,
"canRefund": false
}
Retrieve wallet linkGET/payby/v2/paymaya/link/{link_id}
KEY TYPE: SECRET
Used to retrieve details of a linked wallet.
NOTE: The following is a sample request. To test this API, please use a test credential found here.
Example URI
- link_id
string
(required) Example: 1bbe9edd-0732-405f-93a1-1b5938de3fa0Uniquely identifies a PayMaya wallet in the payment system. Format: UUIDv4.
Headers
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
200
Headers
Content-Type: application/json
Body
{
"profileId": "770234873401",
"card": {
"state": "VERIFIED"
},
"customer": {
"firstName": "John",
"middleName": "Peter",
"lastName": "Doe",
"birthday": "1987-10-10",
"sex": "M",
"contact": {
"phone": "+63(2)1234567890",
"email": "john.peter.doe@myhome.com"
}
}
}
Delete wallet linkDELETE/payby/v2/paymaya/link/{link_id}
KEY TYPE: SECRET
Used to deactivate a PayMaya wallet link.
NOTE: The following is a sample request. To test this API, please use a test credential found here.
Example URI
- link_id
string
(required) Example: 1bbe9edd-0732-405f-93a1-1b5938de3fa0Uniquely identifies a PayMaya wallet in the payment system. Format: UUIDv4.
Headers
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
200
Headers
Content-Type: application/json
Body
{
"profileId": "770234873401",
"card": {
"state": "DELETED"
},
"customer": {
"firstName": "John",
"middleName": "Peter",
"lastName": "Doe",
"birthday": "1987-10-10",
"sex": "M",
"contact": {
"phone": "+63(2)1234567890",
"email": "john.peter.doe@myhome.com"
}
}
}
Get Payment ¶
Get Payment by ID ¶
Get Payment by IDGET/payments/v1/payments/{payment_id}
KEY TYPE: SECRET
Gets a single payment transaction.
The following example shows a request for a transaction with a PAYMENT_SUCCESS
status.
In case of PAYMENT_FAILED
, the error code and description are provided. A sample can be found here.
Example URI
- payment_id
string
(required) Example: 5f1e1df5-b58f-481b-89cb-8dd41afcf771
Headers
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
200
Headers
Content-Type: application/json
Body
{
"id": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"isPaid": true,
"status": "PAYMENT_SUCCESS",
"amount": "100",
"currency": "PHP",
"canVoid": true,
"canRefund": false,
"canCapture": false,
"createdAt": "2019-02-26T09:35:39.000Z",
"updatedAt": "2019-02-26T09:35:50.000Z",
"description": "Charge for John Doe",
"paymentTokenId": "i8bFXYMGkxE5gxzEGjGdxuyS3YHilfjdUkOwJz4EWQGMySV7BmXLa6izHUBUAmA4fRLGXICFsGkoert92zjld0ZNgwW4liOMrwMwuHOKmp71ZmzvqnxcbTUtGzKWZbSV3AQWfJ2XdMJPUXtIehFNjjHrZiOXBPyEVpzg",
"fundSource": {
"type": "paymaya",
"id": "+639191234567",
"description": "***** ***4567",
"details": {
"firstName": "John",
"middleName": "X",
"lastName": "Doe",
"msisdn": "+639191234567",
"email": "john.doe@paymaya.com",
"masked": "********4567"
}
},
"receiptNumber": "703717440845",
"requestReferenceNumber": "1551173739"
}
Get Payment by RRN ¶
Get Payment by RRNGET/payments/v1/payment-rrns/{rrn}
KEY TYPE: SECRET
Used to retrieve a set of transactions indicated by the request reference number (rrn).
NOTE: This API returns an array of payment transactions of the same rrn.
The following example shows a request for a transaction with a PAYMENT_SUCCESS
status.
In case of PAYMENT_FAILED
, the error code and description are provided. A sample can be found here.
Example URI
- rrn
string
(required) Example: 1551173739Transaction reference number assigned by the user (e.g. merchant) to the payment transaction.
Headers
Content-Type: application/json
Authorization: Basic c2stQm9UbTcxb3FBMWpkQ2Q2YndMd3hLM1FzVlBvOVpPY3IxZHBZZnlBUFVVZDo=
200
Headers
Content-Type: application/json
Body
[
{
"id": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"isPaid": true,
"status": "PAYMENT_SUCCESS",
"amount": "100",
"currency": "PHP",
"canVoid": true,
"canRefund": false,
"canCapture": false,
"createdAt": "2019-02-26T09:35:39.000Z",
"updatedAt": "2019-02-26T09:35:50.000Z",
"description": "Charge for John Doe",
"paymentTokenId": "i8bFXYMGkxE5gxzEGjGdxuyS3YHilfjdUkOwJz4EWQGMySV7BmXLa6izHUBUAmA4fRLGXICFsGkoert92zjld0ZNgwW4liOMrwMwuHOKmp71ZmzvqnxcbTUtGzKWZbSV3AQWfJ2XdMJPUXtIehFNjjHrZiOXBPyEVpzg",
"fundSource": {
"type": "paymaya",
"id": "+639191234567",
"description": "***** ***4567",
"details": {
"firstName": "John",
"middleName": "X",
"lastName": "Doe",
"msisdn": "+639191234567",
"email": "john.doe@paymaya.com",
"masked": "********4567"
}
},
"receiptNumber": "703717440845",
"requestReferenceNumber": "1551173739"
}
]
Scan Static QR Payment ¶
The following specifications list down the APIs that can be used to perform payments via scanning consumer-presented static QR or barcode.
Test Credential
API Integrator Key
- Secret Key: sk-hsys96oEOHUai31ouBHwrIHYTfHdHJdVKSVSxZNeNJg
Merchant Account
- P2M ID: 54212615-7ee5-43a5-a4d8-76f5087ecd8c
Payment Card Info
-
PAN: “5424820002859039”
-
Expiry Month: “05”
-
Expiry Year: “2020”
-
CVC: “059”
NOTE: The following API key uses Basic Authorization. For information how to perform this, refer to this link.
Static QR Specs
Format: {m: { v: p2mid, n: name, t: PAYMAYA } }
{
"m":{
"v":"5efe5642-0ffa-4b6d-aae8-cd291db25d27",
"n":"QR Sample Merchant",
"t":"PAYMAYA"
}
}
Create Payment ¶
Create QR PaymentPOST/scan/v2/qr/merchants/{p2m_id}/payments
KEY TYPE: SECRET
Creates a static QR payment transaction from via a merchant’s P2M ID.
This API is meant to be used by payment gateway integrators.
The API returns a payment id that can be then used to execute the payment.
Payment should be executed within a 15-minute timeframe after its creation. Failure to do so will render the transaction expired.
Example URI
- p2m_id
string
(required) Example: 54212615-7ee5-43a5-a4d8-76f5087ecd8c
Headers
Content-Type: application/json
Authorization: Basic c2staHN5czk2b0VPSFVhaTMxb3VCSHdySUhZVGZIZEhKZFZLU1ZTeFpOZU5KZzo=
Body
{
"totalAmount": {
"currency": "PHP",
"value": "100.00"
},
"buyer": {
"firstName": "Juan",
"lastName": "Cruz"
},
"card": {
"number": "5424820002859039",
"expMonth": "05",
"expYear": "2020",
"cvc": "059"
},
"requestReferenceNumber": "5b4a6d60-2165-4bc1-bb0e-e610d1a3f82d"
}
200
Headers
Content-Type: application/json
Body
{
"id": "cec6bd3b-22aa-4687-b035-b5b5aaf359e4",
"isPaid": false,
"status": "PENDING_PAYMENT",
"amount": "100",
"currency": "PHP",
"canVoid": false,
"canRefund": false,
"canCapture": false,
"createdAt": "2019-07-25T09:35:02.000Z",
"updatedAt": "2019-07-25T09:35:02.000Z",
"paymentTokenId": "310170",
"metadata": {},
"requestReferenceNumber": "5b4a6d60-2165-4bc1-bb0e-e610d1a3f82d"
}
Execute QR Payment ¶
Execute QR PaymentPUT/scan/v2/qr/payments/{payment_id}
KEY TYPE: SECRET
Executes a static QR payment transaction.
This API is meant to be used by payment gateway integrators.
Example URI
- payment_id
string
(required) Example: 306ab165-9d54-4226-a0cf-14480a70885c
Headers
Authorization: Basic c2staHN5czk2b0VPSFVhaTMxb3VCSHdySUhZVGZIZEhKZFZLU1ZTeFpOZU5KZzo=
200
Headers
Content-Type: application/json
Body
{
"id": "cec6bd3b-22aa-4687-b035-b5b5aaf359e4",
"isPaid": true,
"status": "PAYMENT_SUCCESS",
"amount": "100",
"currency": "PHP",
"canVoid": true,
"canRefund": false,
"canCapture": false,
"createdAt": "2019-07-25T09:35:02.000Z",
"updatedAt": "2019-07-25T09:35:41.000Z",
"receipt": {
"batchNo": "20190726",
"receiptNo": "920609298538",
"approval_code": "941547"
},
"metadata": {},
"approvalCode": "941547",
"receiptNumber": "20190726941547",
"requestReferenceNumber": "5b4a6d60-2165-4bc1-bb0e-e610d1a3f82d"
}
Scan Dynamic QR Payment ¶
The following specifications list down the APIs that can be used to perform payments via scanning consumer-presented dynamic QR or barcode.
Test Credential
- Secret Key: sk-hsys96oEOHUai31ouBHwrIHYTfHdHJdVKSVSxZNeNJg
NOTE: The following API key uses Basic Authorization. For information how to perform this, refer to this link.
Dynamic QR Specs
Format: {m: { n: name }, t : { p: paymentId, a: amount }}
{
"m": {
"n": "QR Sample Merchant"
},
"t": {
"p": "88583566-97be-4df3-bd31-f5cff357f49e",
"a": "1"
}
}
Create Payment ¶
Create PaymentPOST/payments/v1/qr/payments
KEY TYPE: PUBLIC
Creates a dynamic QR payment transaction.
This API is meant to be used by the merchant.
The API returns a payment id that can be then used to execute the payment.
The redirect URLs are used to go back to merchant’s server after the payment has been processed depending on the status, as shown in the request body.
The metadata is used to add payment facilitator information, as indicated in this section.
Example URI
Headers
Content-Type: application/json
Authorization: Basic c2staHN5czk2b0VPSFVhaTMxb3VCSHdySUhZVGZIZEhKZFZLU1ZTeFpOZU5KZzo=
Body
{
"totalAmount": {
"currency": "PHP",
"value": "100.00"
},
"redirectUrl": {
"success": "http://shop.someserver.com/success?id=6319921",
"failure": "http://shop.someserver.com/failure?id=6319921",
"cancel": "http://shop.someserver.com/cancel?id=6319921"
},
"requestReferenceNumber": "6319921",
"metadata": {}
}
200
Headers
Content-Type: application/json
Body
{
"paymentId": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"redirectUrl": "https://payments-web-sandbox.paymaya.com/v2/qr?id=5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"qrCodeBody": "{\"m\":{\"n\":\"QR Sample Merchant\"},\"t\":{\"p\":\"5f1e1df5-b58f-481b-89cb-8dd41afcf771\",\"a\":100}}"
}
Update QR Payment ¶
Update QR PaymentPOST/scan/v2/qr/payments/{payment_id}
KEY TYPE: SECRET
Used to add payment details (e.g. card information) to an existing pending QR payment transaction.
This API is meant to be used by payment gateway integrators.
Payment should be executed within a 15-minute timeframe after card information is provided. Failure to do so will render the transaction expired.
Example URI
- payment_id
string
(required)
Headers
Content-Type: application/json
Authorization: Basic c2staHN5czk2b0VPSFVhaTMxb3VCSHdySUhZVGZIZEhKZFZLU1ZTeFpOZU5KZzo=
Body
{
"card": {
"number": "5424820002859039",
"expMonth": "05",
"expYear": "2020",
"cvc": "059"
},
"buyer": {
"firstName": "Juan",
"lastName": "Cruz"
}
}
200
Headers
Content-Type: application/json
Body
{
"id": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"isPaid": false,
"status": "PENDING_PAYMENT",
"amount": "100",
"currency": "PHP",
"createdAt": "2018-09-26T08:37:16Z",
"updatedAt": "2018-09-26T08:37:17Z",
"requestReferenceNumber": "6319921",
"canVoid": false,
"canRefund": false,
"metadata": {}
}
Execute QR Payment ¶
Execute QR PaymentPUT/scan/v2/qr/payments/{payment_id}
KEY TYPE: SECRET
Executes a QR payment transaction.
This API is meant to be used by payment gateway integrators.
Example URI
- payment_id
string
(required)
Headers
Content-Type: application/json
Authorization: Basic c2staHN5czk2b0VPSFVhaTMxb3VCSHdySUhZVGZIZEhKZFZLU1ZTeFpOZU5KZzo=
200
Headers
Content-Type: application/json
Body
{
"id": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"isPaid": true,
"status": "PAYMENT_SUCCESS",
"amount": "100",
"currency": "PHP",
"createdAt": "2018-09-26T08:37:16Z",
"updatedAt": "2018-09-26T08:39:17Z",
"requestReferenceNumber": "6319921",
"receiptNumber": "703717440845",
"canVoid": true,
"canRefund": false
}
Get QR Payment ¶
Get QR Payment ¶
Get QR PaymentGET/scan/v2/qr/payments/{payment_id}
KEY TYPE: SECRET
Retrieves a QR payment transaction.
This API is meant to be used by payment gateway integrators.
Example URI
- payment_id
string
(required) Example: cec6bd3b-22aa-4687-b035-b5b5aaf359e4
Headers
Authorization: Basic c2staHN5czk2b0VPSFVhaTMxb3VCSHdySUhZVGZIZEhKZFZLU1ZTeFpOZU5KZzo=
200
Headers
Content-Type: application/json
Body
{
"id": "cec6bd3b-22aa-4687-b035-b5b5aaf359e4",
"isPaid": true,
"status": "PAYMENT_SUCCESS",
"amount": "100",
"currency": "PHP",
"canVoid": true,
"canRefund": false,
"canCapture": false,
"createdAt": "2019-07-25T09:35:02.000Z",
"updatedAt": "2019-07-25T09:35:41.000Z",
"description": "Charge for Juan Cruz",
"paymentTokenId": "310170",
"receipt": {
"batchNo": "20190726",
"receiptNo": "920609298538",
"approval_code": "941547"
},
"metadata": {},
"approvalCode": "941547",
"receiptNumber": "20190726941547",
"requestReferenceNumber": "5b4a6d60-2165-4bc1-bb0e-e610d1a3f82d"
}
Webhooks ¶
Webhook Endpoints ¶
Create webhookPOST/payments/v1/webhooks
KEY TYPE: SECRET
Used to register a webhook.
Example URI
Headers
Content-Type: application/json
Authorization: Basic c2stQm9UbTcxb3FBMWpkQ2Q2YndMd3hLM1FzVlBvOVpPY3IxZHBZZnlBUFVVZDo=
Body
{
"name": "PAYMENT_SUCCESS",
"callbackUrl": "https://www.merchantsite.com/success"
}
200
Headers
Content-Type: application/json
Body
{
"id": "300ddb5c-e939-4166-bbc5-8e951c84b03d",
"name": "PAYMENT_SUCCESS",
"callbackUrl": "https://www.merchantsite.com/success",
"createdAt": "2019-02-26T13:43:32.000Z",
"updatedAt": "2019-02-26T13:43:32.000Z"
}
Retrieve list of webhooksGET/payments/v1/webhooks
KEY TYPE: SECRET
Used to retrieve all registered webhooks.
Example URI
Headers
Content-Type: application/json
Authorization: Basic c2stQm9UbTcxb3FBMWpkQ2Q2YndMd3hLM1FzVlBvOVpPY3IxZHBZZnlBUFVVZDo=
200
Headers
Content-Type: application/json
Body
[
{
"id": "f8543b81-1524-4af0-be38-4e5fd557a38f",
"name": "PAYMENT_SUCCESS",
"callbackUrl": "https://www.merchantsite.com/paymentsuccess",
"createdAt": "2019-02-26T13:54:43.000Z",
"updatedAt": "2019-02-26T13:54:43.000Z"
},
{
"id": "56c3d2fa-194e-40b9-9be3-cead4e2e6662",
"name": "PAYMENT_FAILED",
"callbackUrl": "https://www.merchantsite.com/paymentfailure",
"createdAt": "2019-02-26T13:54:43.000Z",
"updatedAt": "2019-02-26T13:54:43.000Z"
}
]
Retrieve webhookGET/payments/v1/webhooks/{webhook_id}
KEY TYPE: SECRET
Used to retrieve a webhook specified by its unique ID.
Example URI
- webhook_id
string
(required) Example: 300ddb5c-e939-4166-bbc5-8e951c84b03dUniquely identifies a webhook in the payment gateway system. Format: UUIDv4.
Headers
Content-Type: application/json
Authorization: Basic c2stQm9UbTcxb3FBMWpkQ2Q2YndMd3hLM1FzVlBvOVpPY3IxZHBZZnlBUFVVZDo=
200
Headers
Content-Type: application/json
Body
{
"id": "300ddb5c-e939-4166-bbc5-8e951c84b03d",
"name": "PAYMENT_SUCCESS",
"callbackUrl": "https://www.merchantsite.com/success",
"createdAt": "2019-02-26T13:43:32.000Z",
"updatedAt": "2019-02-26T13:43:32.000Z"
}
Update webhookPUT/payments/v1/webhooks/{webhook_id}
KEY TYPE: SECRET
Used to update the callback URL of the webhook.
Example URI
- webhook_id
string
(required) Example: 300ddb5c-e939-4166-bbc5-8e951c84b03dUniquely identifies a webhook in the payment gateway system. Format: UUIDv4.
Headers
Content-Type: application/json
Authorization: Basic c2stQm9UbTcxb3FBMWpkQ2Q2YndMd3hLM1FzVlBvOVpPY3IxZHBZZnlBUFVVZDo=
Body
{
"callbackUrl": "https://www.merchantsite.com/paymentsuccess"
}
200
Headers
Content-Type: application/json
Body
{
"id": "300ddb5c-e939-4166-bbc5-8e951c84b03d",
"name": "PAYMENT_SUCCESS",
"callbackUrl": "https://www.merchantsite.com/paymentsuccess",
"createdAt": "2019-02-26T13:43:32.000Z",
"updatedAt": "2019-02-26T13:51:06.000Z"
}
Delete webhookDELETE/payments/v1/webhooks/{webhook_id}
KEY TYPE: SECRET
Used to remove the registered webhook.
Example URI
- webhook_id
string
(required) Example: 300ddb5c-e939-4166-bbc5-8e951c84b03dUniquely identifies a webhook in the payment gateway system. Format: UUIDv4.
Headers
Content-Type: application/json
Authorization: Basic c2stQm9UbTcxb3FBMWpkQ2Q2YndMd3hLM1FzVlBvOVpPY3IxZHBZZnlBUFVVZDo=
200
Headers
Content-Type: application/json
Body
{
"id": "300ddb5c-e939-4166-bbc5-8e951c84b03d",
"name": "PAYMENT_SUCCESS",
"callbackUrl": "https://www.merchantsite.com/paymentsuccess",
"createdAt": "2019-02-26T13:43:32.000Z",
"updatedAt": "2019-02-26T13:51:06.000Z"
}
Void ¶
Void Payment ¶
Void by IDDELETE/payments/v1/payments/{payment_id}
KEY TYPE: SECRET
Voids a payment transaction before 12am cutoff of the transaction date
Example URI
- payment_id
string
(required) Example: 5f1e1df5-b58f-481b-89cb-8dd41afcf771
Headers
Content-Type: application/json
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
Body
{
"reason": "Incorrect item ordered."
}
200
Headers
Content-Type: application/json
Body
{
"id": "16412a59-72e7-401d-a233-cd71afccb85a",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"status": "SUCCESS",
"reason": "Incorrect item ordered.",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
Void by IDPOST/payments/v1/payments/{payment_id}/voids
KEY TYPE: SECRET
Voids a payment transaction before 12am cutoff of the transaction date
Example URI
- payment_id
string
(required) Example: 5f1e1df5-b58f-481b-89cb-8dd41afcf771
Headers
Content-Type: application/json
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
Body
{
"reason": "Incorrect item ordered."
}
200
Headers
Content-Type: application/json
Body
{
"id": "16412a59-72e7-401d-a233-cd71afccb85a",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"status": "SUCCESS",
"reason": "Incorrect item ordered.",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
Void by RRNPOST/payments/v1/payment-rrns/{rrn}/voids
KEY TYPE: SECRET
Voids a payment transaction using merchant-provided reference number before 12am cutoff of the transaction date.
NOTE: Voiding thru this API only works if the rrn is unique to the merchant. In case it is not, void thru payment ID should be used.
Example URI
- rrn
string
(required) Example: REF8dd41afcf771Merchant-provided reference number that identifies the payment transaction.
Headers
Content-Type: application/json
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
Body
{
"reason": "Incorrect item ordered."
}
200
Headers
Content-Type: application/json
Body
{
"id": "16412a59-72e7-401d-a233-cd71afccb85a",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"status": "SUCCESS",
"reason": "Incorrect item ordered.",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
Get Payment VoidsGET/payments/v1/payments/{payment_id}
KEY TYPE: SECRET
Gets void transactions of a payment
Example URI
- payment_id
string
(required) Example: 5f1e1df5-b58f-481b-89cb-8dd41afcf771
Headers
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
200
Headers
Content-Type: application/json
Body
[
{
"id": "16412a59-72e7-401d-a233-cd71afccb85a",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"status": "SUCCESS",
"reason": "Incorrect item ordered.",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
]
Get VoidGET/payments/v1/payments/{payment_id}/voids/{void_id}
KEY TYPE: SECRET
Gets a void transaction of a given payment transaction
Example URI
- payment_id
string
(required) Example: 5f1e1df5-b58f-481b-89cb-8dd41afcf771- void_id
string
(required) Example: 16412a59-72e7-401d-a233-cd71afccb85a
Headers
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
200
Headers
Content-Type: application/json
Body
{
"id": "16412a59-72e7-401d-a233-cd71afccb85a",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"status": "SUCCESS",
"reason": "Incorrect item ordered.",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
Refund ¶
Refund Payment ¶
Refund by IDPOST/payments/v1/payments/{payment_id}/refunds
KEY TYPE: SECRET
Refunds a payment transaction after 12am cutoff of the transaction date
Example URI
- payment_id
string
(required) Example: 5f1e1df5-b58f-481b-89cb-8dd41afcf771
Headers
Content-Type: application/json
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
Body
{
"totalAmount": {
"amount": 250,
"currency": "PHP"
},
"reason": "Item out of stock"
}
200
Headers
Content-Type: application/json
Body
{
"id": "fbc7d874-4f05-45e8-b205-14e2d07657f5",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"amount": "250.00",
"currency": "PHP",
"status": "SUCCESS",
"reason": "Item out of stock",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
Refund by RRNPOST/payments/v1/payment-rrns/{rrn}/refunds
KEY TYPE: SECRET
Refunds a payment transaction using merchant-provided reference number after 12am cutoff of the transaction date.
NOTE: Refunding thru this API only works if the rrn is unique to the merchant. In case it is not, refund thru payment ID should be used.
Example URI
- rrn
string
(required) Example: REF8dd41afcf771Merchant-provided reference number that identifies the payment transaction.
Headers
Content-Type: application/json
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
Body
{
"totalAmount": {
"amount": 250,
"currency": "PHP"
},
"reason": "Item out of stock"
}
200
Headers
Content-Type: application/json
Body
{
"id": "fbc7d874-4f05-45e8-b205-14e2d07657f5",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"amount": "250.00",
"currency": "PHP",
"status": "SUCCESS",
"reason": "Item out of stock",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
Get Payment RefundsGET/payments/v1/payments/{payment_id}/refunds
KEY TYPE: SECRET
Retrieves a lit of refund transactions of a payment.
Example URI
- payment_id
string
(required) Example: 5f1e1df5-b58f-481b-89cb-8dd41afcf771
Headers
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
200
Headers
Content-Type: application/json
Body
[
{
"id": "fbc7d874-4f05-45e8-b205-14e2d07657f5",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"amount": "250.00",
"currency": "PHP",
"status": "SUCCESS",
"reason": "Item out of stock",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
]
Get RefundGET/payments/v1/payments/{payment_id}/refunds/{refund_id}
KEY TYPE: SECRET
Gets a refund transaction
Example URI
- payment_id
string
(required) Example: 5f1e1df5-b58f-481b-89cb-8dd41afcf771- refund_id
string
(required) Example: fbc7d874-4f05-45e8-b205-14e2d07657f5
Headers
Authorization: Basic c2stTk1kYTYwN0ZlWk5HUnQ5eENkc0lSaVo0THF1NkxUODk4SXRIYk40cVBTZTo=
200
Headers
Content-Type: application/json
Body
{
"id": "fbc7d874-4f05-45e8-b205-14e2d07657f5",
"payment": "5f1e1df5-b58f-481b-89cb-8dd41afcf771",
"amount": "250.00",
"currency": "PHP",
"status": "SUCCESS",
"reason": "Item out of stock",
"createdAt": "2018-03-05T06:39:08Z",
"updatedAt": "2018-03-05T06:39:10Z"
}
Errors ¶
Error Codes and Messages
Name | Code | Message |
MISSING_INVALID_PARAMS | 2553 PYBY0001 | Missing/invalid parameters. |
INTERNAL_SERVER_ERROR | PY0001 PY0066 PY0067 PYBY0012 PYBY9999 | A problem is encountered. Please contact your system administrator. |
CARD_EXPIRED_ERROR | PY0002 | Card is expired. |
CARD_INVALID_ERROR | PY0003 | Card is invalid. |
PAYMENT_TOKEN_EXPIRED_OR_USED | PY0007 | Invalid token status. |
PAYMENT_TOKEN_NOT_FOUND | PY0008 | Token is invalid. |
PAYMENT_DOES_NOT_EXIST | PY0009 PYBY0002 | Payment does not exist. |
FAILED_TO_PROCESS_PAYMENT | PY0010 | Failed to process payment. |
CARD_VAULT_UNREACHABLE | PY0013 | Card Vault server unreachable / timed out. |
CARD_VAULT_ERROR | PY0014 | Card Vault service error. |
PROCESSOR_SERVER_UNREACHABLE | PY0015 | Payment processor server unreachable / timed out. |
PROCESSOR_SERVER_ERROR | PY0016 | Payment processor service error. |
MERCHANT_NOT_FOUND | PY0017 PYBY0003 | Merchant not found. |
MERCHANT_FORBIDDEN | PY0019 PYBY0004 | Forbidden. |
MERCHANT_REQUIRED | PY0020 | Merchant is required. |
FAILED_TO_ADD_CUSTOMER | PY0021 | Failed to add customer. |
CUSTOMER_DOES_NOT_EXIST | PY0023 | Customer does not exist. |
FAILED_TO_DELETE_CUSTOMER | PY0024 | Failed to delete customer. |
FAILED_TO_UPDATE_CUSTOMER | PY0025 | Failed to update customer details. |
FAILED_TO_UPDATE_CARD | PY0026 | Failed to update card details. |
CARD_DOES_NOT_EXIST | PY0027 | Card does not exist. |
FAILED_TO_DELETE_CARD | PY0028 | Failed to delete card. |
NO_CARD_FOUND | PY0029 | No card found for customer. |
CARD_TOKEN_INVALID_STATUS | PY0030 | Invalid card token status. |
FAILED_TO_ADD_CARD | PY0035 | Failed to add card to customer. |
CARD_NOT_SUPPORTED_ERROR | PY0036 | Card is not supported. |
CURRENCY_NOT_SUPPORTED_ERROR | PY0037 | Currency is not supported. |
WEBHOOK_DOES_NOT_EXIST | PY0038 | Webhook does not exist. |
WEBHOOK_ALREADY_EXISTS | PY0039 | Webhook already exists. |
CHECKOUT_SERVER_ERROR | PY0041 | A problem is encountered. Please contact your system administrator. |
SUBSCRIPTION_CANNOT_CHARGE | PY0042 | Charging of subscription is not applicable. |
CARD_ALREADY_EXISTS | PY0043 | Card already exists. |
PAYMENT_INVALID | PY0044 | Payment is invalid. |
INVALID_VOID_REQUEST | PY0045 | Payment is not available for void. |
REFUND_DOES_NOT_EXIST | PY0046 | Refund does not exist. |
INELIGIBLE_FOR_REFUND | PY0047 | Payment is ineligible for refund. |
INVALID_REFUND_AMOUNT | PY0048 | Requested refund amount is greater than the original amount. |
SUBSCRIPTION_DOES_NOT_EXIST | PY0049 | Subscription does not exist. |
FAILED_TO_ADD_SUBSCRIPTION | PY0050 | Failed to add subscription to card. |
FAILED_TO_UPDATE_SUBSCRIPTION | PY0051 | Failed to update subscription details. |
FAILED_TO_CANCEL_SUBSCRIPTION | PY0052 | Failed to cancel subscription. |
MERCHANT_ALREADY_EXISTS | PY0053 | Merchant already exists. |
SUBSCRIPTION_ALREADY_CHARGED | PY0054 | Subscription already charged. |
FAILED_DELETE_MERCHANT | PY0056 | Failed to delete merchant. |
PAYMENT_EXPIRED | PY0057 | The Payment has expired and cannot be processed. |
MERCHANT_CANNOT_P2M | PY0058 | The merchant indicated does not have P2M services enabled. |
CUSTOMER_VAULT_UNREACHABLE | PY0059 | Customer Vault server unreachable / timed out. |
CUSTOMER_VAULT_ERROR | PY0060 | Customer Vault service error. |
VOID_NOT_FOUND | PY0063 | Void does not exist. |
MERCHANT_NOT_CUSTOMIZED | PY0065 | This merchant has no customizations present. |
AUTH_FAILURE | PY0068 | Payment not executed due to authorization failure. |
AUTH_SERVER_UNREACHABLE | PY0069 | Authentication server unreachable / timed out. |
SCHEME_UNSUPPORTED_BY_MERCHANT | PY0070 | Scheme is unsupported by merchant |
PROCESSOR_MISMATCH_ERROR | PY0071 | Payment mismatch with Merchant. |
REFUND_CUTOFF | PY0072 | Transaction cannot be processed. Cannot refund a transaction before cut off time. |
VOID_CUTOFF | PY0073 | Transaction cannot be processed. Cannot void a transaction after cut off time. |
TERMINAL_DOES_NOT_EXIST | PY0074 | Terminal does not exist. |
BATCH_NOT_FOUND | PY0075 | Batch not found |
PAYMENT_ALREADY_EXISTS | PY0076 | Payment already exists. |
PAYMENT_TOKEN_ALREADY_EXISTS | PY0077 | Payment Token already exists. |
BATCH_STARTED | PY0078 | Batch has already started. |
NO_AUTHORIZED_PAYMENTS_IN_BATCH | PY0079 | Batch does not contain any payments. |
PAYMENT_DETAILS_MISMATCH | PY0080 | Payment details do not match. |
BATCH_NOT_FOR_RECON | PY0081 | Batch is not available for reconciliation. |
TERMINAL_PARTY_EXISTS | PY0083 | Terminal party id already exists. |
TERMINAL_MERCHANT_PROCESSOR_EXISTS | PY0084 | Terminal processor id already exists. |
CANNOT_VOID_TERMINAL_AUTHORIZED_PAYMENT | PY0085 | Authorized payment must be voided from terminal. |
CANNOT_VOID_CAPTURED_PAYMENT_IN_TERMINAL | PY0086 | Void unavailable in terminal. Please contact your administrator. |
CARD_ALREADY_PROVIDED | PY0088 | Card data already provided. |
NO_CARD_PROVIDED | PY0089 | No card data provided. |
RRN_NOT_UNIQUE | PY0104 | Reference number is linked to multiple payments. |
INSUFFICIENT_BALANCE | PY0105 | Account has insufficient balance to perform this transaction. |
PARTIAL_REFUND_NOT_ALLOWED | PY0113 | Partial refund is not allowed for this transaction. |
BIN_ERROR | PY0117 | Card is invalid. |
ISSUER_DECLINE_CARD_ACCOUNT | PY0119 | Issuer declined card or account. |
ISSUER_DECLINE_GENERIC | PY0120 | Issuer decline. |
ISSUER_DECLINE_EXPIRED | PY0121 | Card is expired. |
ISSUER_SYSTEM_DOWN | PY0122 | Issuer system is unavailable. |
ACCOUNT_LIMIT | PY0123 | Account limit exceeded. |
VERIFICATION_FAILED | PY0124 | Transaction could not be verified. |
PIN_ERROR | PY0125 | PIN is invalid or incorrect. |
ACTIVE_TERMINAL_DOES_NOT_EXIST | PY0999 | No active terminal exists. |
FAILED_TO_DEACTIVATE_TERMINAL | PY0999 | Failed to deactivate terminal. |
MISSING_CP_PARAMS | PY9999 | Missing/invalid parameters. |
DIRECTPAYMENT_DOES_NOT_EXIST | PY9999 | Direct Payment does not exist. |
PAYBY_SERVER_ERROR | PYBY0001 | A problem is encountered. Please contact your system |
PAYMAYA_CONNECT_ERROR | PYBY0005 | PayMaya Issuing or Connect service error. |
PAYMENT_VAULT_ERROR | PYBY0006 | Payment Vault service error. |
CURRENCY_MISMATCH | PYBY0007 | Payment currency does not match the user account currency. |
INSUFFICIENT_BALANCE | PYBY0008 | Account has insufficient balance to perform this transaction. |
WALLET_NOT_FOUND | PYBY0009 | Wallet does not exist. |
WALLET_IS_INACTIVE | PYBY0010 | Wallet is inactive or deleted from the system and cannot be used for this transaction. |
PAYMENT_EXPIRED | PYBY0011 | Payment has expired and cannot be processed. |
WALLET_EXISTS | PYBY0013 | Wallet has already been created. Please create a new one. |
Error Code in Payment Info
When retrieving information through the GET-payment endpoints either via paymentId or rrn of a failed transaction (i.e. status is PAYMENT_FAILED
),
the response payload includes the code and description of the error under the properties errorCode
and errorReason
, respectively.
A sample is provided below for guidance:
{
"id": "c74c9189-d719-4795-92cc-2093db116d8a",
"isPaid": false,
"status": "PAYMENT_FAILED",
"amount": "450",
"currency": "PHP",
"canVoid": false,
"canRefund": false,
"canCapture": false,
"createdAt": "2021-02-26T05:51:53.000Z",
"updatedAt": "2021-02-26T05:52:31.000Z",
"description": "Charge for John Doe",
"paymentTokenId": "GEqjthTla9f5GT7DtW7CmErJR2wV6Rc1MIkuPobEgnTJZUyB8LfMfzIUUqIqejuWtzq7n81uDiGZW3ezgnL9me9gcKv3zmqMbhZcYI9D5UO6C3hQImuFRRXlr4L8Q4t96560mNrv6uFoveW7kFRx9NGoAYsibi8XFAWw",
"fundSource": {
"type": "paymaya",
"id": "+639191234567",
"description": "***** ***4567",
"details": {
"firstName": "John",
"middleName": "X",
"lastName": "Doe",
"msisdn": "+639191234567",
"email": "john.doe@paymaya.com",
"masked": "********4567"
}
},
"requestReferenceNumber": "1551173739",
"errorCode": "PY0122",
"errorMessage": "[PY0122] Issuer system is unavailable."
}
API Authentication Error Codes
Name | Code | Message |
---|---|---|
MISSING_AUTHENTICATION_HEADER | K001 | “Kindly include a Base64 encoded key in the basic authentication header.” |
KEY_EXPIRED | K002 | “Please generate a new key.” |
INVALID_API_KEY | K003 | “Invalid authentication credentials. Kindly verify if the key you are using is correct.” |
INVALID_KEY_TYPE | K004 K005 |
“Please use secret / public key instead.” |
INVALID_AUTHORIZATION_HEADER | K006 | “Key provided is not a valid Base64 encoded key.” |
INVALID_KEY_SCOPE | K007 | “Please check the provided key’s scopes.” |
INTERNAL_AUTHENTICATION_ERROR | K999 | “Please contact PayMaya support.” |
Status Codes ¶
Payment Status
Status | Description |
---|---|
PENDING_TOKEN | Payment is yet to be assigned a payment method (e.g. PayMaya Account). |
PENDING_PAYMENT | Payment is yet to be processed with the chosen payment method (e.g. PayMaya Account). |
PAYMENT_PROCESSING | Payment is being processed. |
PAYMENT_SUCCESS | Payment is successfully processed. |
PAYMENT_EXPIRED | Payment has expired and is not processed. |
PAYMENT_FAILED | Payment processing failed. |
VOIDED | Payment has been voided. |
REFUNDED | Payment has at least one successful refund. |