improved

New webhook data values for Pay with Maya

Maya Business' Online Payments will introduce new features and improvements to Pay with Maya. These improvements will include new webhook data behavior once merchants will use the new Pay with Maya experience.

The team has introduced placeholder values to certain fields should a merchant's customer will use Pay with Maya as a payment fund source. More details on each webhook data changes below.

CHECKOUT_SUCCESS

Changes:

  • paymentDetails.responses.efs.paymentTransactionReferenceNo is mapped with the value of payment.processorRefNo
  • paymentDetails.responses.efs.status is always set to SUCCESS
  • receiptNumber maps with payment.processorRefNo
  • Supplied asterisks (*) on unavailable paymentDetails.responses.efs values
  • New Maya Pay payment schemes are added. The new full list is:
    • master-card
    • visa
    • jcb
    • bancnet
    • american-express
    • wechat-dynamic-qr
    • wechat-payer-qr
    • wechat-official-qr
    • maya-wallet
    • maya-credit
    • maya-bnpl
    • wechat
    • shopeepay
    • alipay
    • gcash
    • qrph
{
    "id": "d28376f0-f504-4681-b8eb-8c1568c14569",
    "items": [],
    "metadata": {
        "paymaya": {
            "invoice": {
                "id": "91f2c390-1590-4d54-8e5d-aa66c78e4573",
                "invoiceNumber": "PGQE3DS2"
            }
        }
    },
    "requestReferenceNumber": "PGQEINVOICE3DS2",
    "receiptNumber": "220603960690",
    "createdAt": "2022-07-25T03:57:41.000Z",
    "updatedAt": "2022-07-25T03:58:18.000Z",
    "paymentScheme": "visa",
    "expressCheckout": true,
    "refundedAmount": "0",
    "canPayPal": false,
    "expiredAt": "2022-07-25T04:57:41.000Z",
    "status": "COMPLETED",
    "paymentStatus": "PAYMENT_SUCCESS",
    "paymentDetails": {
        "responses": {
            "efs": {
                "paymentTransactionReferenceNo": "2f8aa146-3a07-2503-5818-220603960690",
                "status": "SUCCESS",
                "receipt": {
                    "transactionId": "cd11d6b7-59f",
                    "batchNo": "20220726",
                    "receiptNo": "220603960690",
                    "approval_code": "774392",
                    "approvalCode": "774392"
                },
                "payer": {
                    "fundingInstrument": {
                        "card": {
                            "cardNumber": "483442******1969",
                            "expiryMonth": "12",
                            "expiryYear": "2025",
                            "account": "DEFAULT",
                            "vaulted": false
                        }
                    }
                },
                "amount": {
                    "total": {
                        "value": 1,
                        "currency": "PHP"
                    }
                },
                "created_at": "2022-07-25T03:58:18Z"
            }
        },
        "paymentAt": "2022-07-25T03:58:18.000Z",
        "3ds": false
    },
    "buyer": {
        "contact": {
            "phone": "+639193890579",
            "email": "buyer@gmail.com"
        },
        "firstName": "juan",
        "lastName": "cruz",
        "middleName": "dela",
        "billingAddress": {},
        "shippingAddress": {}
    },
    "merchant": {
        "currency": "PHP",
        "email": "merchant@paymaya.com",
        "locale": "en",
        "homepageUrl": "https://developers.paymaya.com",
        "isEmailToMerchantEnabled": true,
        "isEmailToBuyerEnabled": true,
        "isPaymentFacilitator": false,
        "isPageCustomized": true,
        "supportedSchemes": [
            "Mastercard",
            "Visa",
            "JCB",
            "AMEX"
        ],
        "canPayPal": false,
        "payPalEmail": null,
        "payPalWebExperienceId": null,
        "expressCheckout": true,
        "name": "3DS2"
    },
    "totalAmount": {
        "value": "1",
        "currency": "PHP",
        "details": null
    },
    "redirectUrl": {},
    "transactionReferenceNumber": "2f8aa146-3a07-2503-5818-220603960690"
}
{
    "id": "d28376f0-f504-4681-b8eb-8c1568c14569",
    "items": [],
    "metadata": {},
    "requestReferenceNumber": "PGQEINVOICE3DS2",
    "receiptNumber": "000000000000",
    "createdAt": "2022-07-25T03:57:41.000Z",
    "updatedAt": "2022-07-25T03:58:18.000Z",
    "paymentScheme": "maya-wallet",
    "expressCheckout": true,
    "refundedAmount": "0",
    "canPayPal": false,
    "expiredAt": "2022-07-25T04:57:41.000Z",
    "status": "COMPLETED",
    "paymentStatus": "PAYMENT_SUCCESS",
    "paymentDetails": {
        "responses": {
            "efs": {
                "paymentTransactionReferenceNo": "75cdbdc9-0a16-42b1-b308-71139cf50eec",
                "status": "SUCCESS",
                "receipt": {
                    "transactionId": "******",
                    "batchNo": "00000000",
                    "receiptNo": "000000000000",
                    "approval_code": "******",
                    "approvalCode": "******"
                },
                "payer": {
                    "fundingInstrument": {
                        "card": {
                            "cardNumber": "******",
                            "expiryMonth": "**",
                            "expiryYear": "****",
                            "account": "******",
                            "vaulted": false
                        }
                    }
                },
                "amount": {
                    "total": {
                        "value": 1,
                        "currency": "PHP"
                    }
                },
                "created_at": "2022-07-25T03:58:18Z"
            }
        },
        "paymentAt": "2022-07-25T03:58:18.000Z",
        "3ds": false
    },
    "buyer": {
        "contact": {
            "phone": "+639193890579",
            "email": "buyer@gmail.com"
        },
        "firstName": "Juan",
        "lastName": "Cruz",
        "middleName": "dela",
        "billingAddress": {},
        "shippingAddress": {}
    },
    "merchant": {
        "currency": "PHP",
        "email": "merchant@paymaya.com",
        "locale": "en",
        "homepageUrl": "https://developers.paymaya.com",
        "isEmailToMerchantEnabled": true,
        "isEmailToBuyerEnabled": true,
        "isPaymentFacilitator": false,
        "isPageCustomized": true,
        "supportedSchemes": [
            "Mastercard",
            "Visa",
            "JCB",
            "AMEX"
        ],
        "canPayPal": false,
        "payPalEmail": null,
        "payPalWebExperienceId": null,
        "expressCheckout": true,
        "name": "3DS2"
    },
    "totalAmount": {
        "value": "1",
        "currency": "PHP",
        "details": null
    },
    "redirectUrl": {},
    "transactionReferenceNumber": "2f8aa146-3a07-2503-5818-220603960690"
}

CHECKOUT_FAILURE

No change

{
  "id": "35896eb4-cc80-4e8f-9314-739b08f10d2e",
  "items": [],
  "metadata": null,
  "requestReferenceNumber": "1680000002528_89924839",
  "receiptNumber": "d94b95fb-0c0e-4f0f-bd09-dfd2d37df76f",
  "createdAt": "2022-08-01T05:15:41.000Z",
  "updatedAt": "2022-08-01T05:13:09.000Z",
  "paymentScheme": "visa",
  "expressCheckout": true,
  "refundedAmount": "0",
  "canPayPal": false,
  "expiredAt": "2022-08-01T06:15:41.000Z",
  "status": "COMPLETED",
  "paymentStatus": "PAYMENT_FAILED",
  "buyer": {
    "contact": {
      "phone": "9999999999",
      "email": "buyer@gmail.com"
    },
    "firstName": "First name",
    "lastName": "Last name",
    "billingAddress": {
      "city": "City",
      "zipCode": "5468",
      "countryCode": "PH"
    },
    "shippingAddress": {}
  },
  "merchant": {
    "currency": "PHP",
    "email": "merchant@gmail.com",
    "locale": "en",
    "homepageUrl": "https://www.merchant.com/",
    "isEmailToMerchantEnabled": true,
    "isEmailToBuyerEnabled": true,
    "isPaymentFacilitator": false,
    "isPageCustomized": true,
    "supportedSchemes": ["Mastercard", "Visa", "JCB"],
    "canPayPal": false,
    "payPalEmail": null,
    "payPalWebExperienceId": null,
    "expressCheckout": true,
    "name": "Merchant"
  },
  "totalAmount": {
    "value": "1239",
    "currency": "PHP",
    "details": null
  },
  "redirectUrl": {
    "success": "https://www.merchantsite.com/success",
    "failure": "https://www.merchantsite.com/failure",
    "cancel": "http://merchantsite.com/cancel"
  },
  "transactionReferenceNumber": "d94b95fb-0c0e-4f0f-bd09-dfd2d37df76f"
}
{
  "id": "35896eb4-cc80-4e8f-9314-739b08f10d2e",
  "items": [],
  "metadata": null,
  "requestReferenceNumber": "1680000002528_89924839",
  "receiptNumber": "d94b95fb-0c0e-4f0f-bd09-dfd2d37df76f",
  "createdAt": "2022-08-01T05:15:41.000Z",
  "updatedAt": "2022-08-01T05:13:09.000Z",
  "paymentScheme": "maya-wallet",
  "expressCheckout": true,
  "refundedAmount": "0",
  "canPayPal": false,
  "expiredAt": "2022-08-01T06:15:41.000Z",
  "status": "COMPLETED",
  "paymentStatus": "PAYMENT_FAILED",
  "buyer": {
    "contact": {
      "phone": "9999999999",
      "email": "buyer@gmail.com"
    },
    "firstName": "First name",
    "lastName": "Last name",
    "billingAddress": {
      "city": "City",
      "zipCode": "5468",
      "countryCode": "PH"
    },
    "shippingAddress": {}
  },
  "merchant": {
    "currency": "PHP",
    "email": "merchant@site.com",
    "locale": "en",
    "homepageUrl": "https://www.merchant.com/",
    "isEmailToMerchantEnabled": true,
    "isEmailToBuyerEnabled": true,
    "isPaymentFacilitator": false,
    "isPageCustomized": true,
    "supportedSchemes": ["Mastercard", "Visa", "JCB"],
    "canPayPal": false,
    "payPalEmail": null,
    "payPalWebExperienceId": null,
    "expressCheckout": true,
    "name": "Merchant"
  },
  "totalAmount": {
    "value": "1239",
    "currency": "PHP",
    "details": null
  },
  "redirectUrl": {
    "success": "https://www.merchantsite.com/success",
    "failure": "https://www.merchantsite.com/failure",
    "cancel": "http://merchant.com:8080/"
  },
  "transactionReferenceNumber": "d94b95fb-0c0e-4f0f-bd09-dfd2d37df76f"
}

CHECKOUT_DROPOUT

No changes required

PAYMENT_SUCCESS

Changes:

  • Set paymentTokenId value to asterisks (*)
  • Set fundSource object values to use id and type as-is, and pad description and details values to asterisks (*)
  • fundSource.description add six asterisks (*) padding
  • Set all receipt values to asterisks (*)
  • Set approvalCode and receiptNumber values to asterisks (*)
{
  "id": "e732f996-cb87-4120-b712-166d8183c01d",
  "isPaid": true,
  "status": "PAYMENT_SUCCESS",
  "amount": "10",
  "currency": "PHP",
  "canVoid": true,
  "canRefund": true,
  "canCapture": false,
  "createdAt": "2021-07-01T08:26:13.000Z",
  "updatedAt": "2021-07-01T08:26:16.000Z",
  "description": "Charge for maya.juan@mail.com",
  "paymentTokenId": "f2Z54aBePxQ94bxbKTivBgtP79igw7EtVI2iQ5yC1qSbnpONVZiPBOszn6QWG8eamJ3aMwcshX0RDkCf7skvMCvZkmIwX88Bs4vBsmLpeXJLDpsMkxyhz1PKgTWB9s3ndGtr1SDLOFDrr8IG242xJFCkEWHpdlWkG7lts",
  "fundSource": {
    "type": "paymaya",
    "id": null,
    "description": "PayMaya Account",
    "details": {
      "scheme": "master-card",
      "last4": "4154",
      "first6": "545301",
      "masked": "545301******4154",
      "issuer": "Others"
    }
  },
  "receipt": {
    "transactionId": "41f17efc-a48b-450d-a69d-6808fd35e8ec",
    "receiptNo": "18976ad0a321",
    "approval_code": "00001234",
    "approvalCode": "00001234"
  },
  "metadata": {},
  "approvalCode": "00001234",
  "receiptNumber": "18976ad0a321",
  "requestReferenceNumber":"ABC000001"
}
{
    "id": "d28376f0-f504-4681-b8eb-8c1568c14569",
    "isPaid": true,
    "status": "PAYMENT_SUCCESS",
    "amount": "1",
    "currency": "PHP",
    "canVoid": true,
    "canRefund": true,
    "canCapture": false,
    "createdAt": "2022-07-25T03:57:41.000Z",
    "updatedAt": "2022-07-25T03:58:18.000Z",
    "description": "Charge for fgpgonzales@gmail.com",
    "paymentTokenId": "******",
    "fundSource": {
        "id": "91f2c390-1590-4d54-8e5d-aa66c78e4573",
        "type": "maya-wallet",
        "description": "******84",
        "details": {
            "firstName": "juan",
            "middleName": "dela",
            "lastName": "cruz",
            "msisdn": "+639193890579",
            "email": "juandelacruz@gmail.com",
            "masked": "********0535",
            "profileId": "772577324264"
        }
    },
    "receipt": {
        "transactionId": "******",
        "batchNo": "00000000",
        "receiptNo": "000000000000",
        "approval_code": "******",
        "approvalCode": "******"
    },
    "metadata": {},
    "approvalCode": "******",
    "receiptNumber": "000000000000",
    "requestReferenceNumber": "PGQEINVOICE3DS2"
}

PAYMENT_FAILED

Changes:

  • set paymentTokenId to asterisks (*)
  • Set fundSource object values to use id and type as-is, and pad description and details values to asterisks (*)
  • fundSource.description add six asterisks (*) padding
{
  "id": "4a8fbe14-de55-4d27-a121-2a55210f5d9f",
  "isPaid": false,
  "status": "PAYMENT_FAILED",
  "amount": "20419",
  "currency": "PHP",
  "canVoid": false,
  "canRefund": false,
  "canCapture": false,
  "createdAt": "2022-08-01T05:29:57.000Z",
  "updatedAt": "2022-08-01T05:29:18.000Z",
  "description": "Charge for jvimperial@dmcihomes.com",
  "paymentTokenId": "******",
  "fundSource": {
    "id": "91f2c390-1590-4d54-8e5d-aa66c78e4573",
    "type": "maya-wallet",
    "description": "******84",
    "details": {
      "firstName": "Juan",
      "middleName": "dela",
      "lastName": "Cruz",
      "msisdn": "+639193890579",
      "email": "juandelacruz@gmail.com",
      "masked": "********0535",
      "profileId": "772577324264"
    }
  },
  "metadata": {},
  "requestReferenceNumber": "4DFCFC4B-4C2F-4246-BFFF-A3C9CC475019"
}
{
  "id": "4a8fbe14-de55-4d27-a121-2a55210f5d9f",
  "isPaid": false,
  "status": "PAYMENT_FAILED",
  "amount": "20419",
  "currency": "PHP",
  "canVoid": false,
  "canRefund": false,
  "canCapture": false,
  "createdAt": "2022-08-01T05:29:57.000Z",
  "updatedAt": "2022-08-01T05:29:18.000Z",
  "description": "Charge for buyer@gmail.com",
  "paymentTokenId": "******",
  "fundSource": {
    "id": "91f2c390-1590-4d54-8e5d-aa66c78e4573",
    "type": "maya-wallet",
    "description": "******84",
		"details": {
      "firstName": "Juan",
      "middleName": "Dela",
      "lastName": "Cruz",
      "msisdn": "+639193890579",
      "email": "buyer@gmail.com",
      "masked": "********0535",
      "profileId": "772577324264"
    }
  },
  "metadata": {},
  "requestReferenceNumber": "4DFCFC4B-4C2F-4246-BFFF-A3C9CC475019"
}

PAYMENT_EXPIRED

No change needed

What does this mean for you as developers?

No immediate change needed if your integration is using the current Pay with Maya configuration. However, in the event that your merchant will use the new Pay with Maya experience, our team is recommending to review the webhook data behavior before switching to the new Pay with Maya experience.

For any questions or concerns, please contact us through our support channels.