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": "[email protected]"
        },
        "firstName": "juan",
        "lastName": "cruz",
        "middleName": "dela",
        "billingAddress": {},
        "shippingAddress": {}
    },
    "merchant": {
        "currency": "PHP",
        "email": "[email protected]",
        "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": "[email protected]"
        },
        "firstName": "Juan",
        "lastName": "Cruz",
        "middleName": "dela",
        "billingAddress": {},
        "shippingAddress": {}
    },
    "merchant": {
        "currency": "PHP",
        "email": "[email protected]",
        "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": "[email protected]"
    },
    "firstName": "First name",
    "lastName": "Last name",
    "billingAddress": {
      "city": "City",
      "zipCode": "5468",
      "countryCode": "PH"
    },
    "shippingAddress": {}
  },
  "merchant": {
    "currency": "PHP",
    "email": "[email protected]",
    "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": "[email protected]"
    },
    "firstName": "First name",
    "lastName": "Last name",
    "billingAddress": {
      "city": "City",
      "zipCode": "5468",
      "countryCode": "PH"
    },
    "shippingAddress": {}
  },
  "merchant": {
    "currency": "PHP",
    "email": "[email protected]",
    "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": "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 [email protected]",
    "paymentTokenId": "SL7faNpUz149DQa8Zc2GqpSMJC1P9LQwolo9ons81iuoyMsM9saxkgZ6C0UlKdti46t0AxRlvLrkm85V6zlimaQtwOrcaxUen3B1NI396cdR69dGVtvVmVhevFLek9rVp5xKshsqDl6YOL4WdDAFJUp8XGZrShrqgMw",
    "fundSource": {
        "type": "paymaya",
        "id": "+639193890579",
        "description": "***** ***0535",
        "details": {
            "firstName": "Juan",
            "middleName": "Dela",
            "lastName": "Cruz",
            "msisdn": "+639193890579",
            "email": "[email protected]",
            "masked": "********0535",
            "profileId": "772577324264"
        }
    },
    "receipt": {
        "transactionId": "cd11d6b7-59f",
        "batchNo": "20220726",
        "receiptNo": "220603960690",
        "approval_code": "774392",
        "approvalCode": "774392"
    },
    "metadata": {
        "paymaya": {
            "invoice": {
                "id": "91f2c390-1590-4d54-8e5d-aa66c78e4573",
                "invoiceNumber": "PGQE3DS2"
            }
        }
    },
    "approvalCode": "774392",
    "receiptNumber": "220603960690",
    "requestReferenceNumber": "PGQEINVOICE3DS2"
}
{
    "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 [email protected]",
    "paymentTokenId": "******",
    "fundSource": {
        "id": "91f2c390-1590-4d54-8e5d-aa66c78e4573",
        "type": "maya-wallet",
        "description": "******84",
        "details": {
            "firstName": "juan",
            "middleName": "dela",
            "lastName": "cruz",
            "msisdn": "+639193890579",
            "email": "[email protected]",
            "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 [email protected]",
  "paymentTokenId": "******",
  "fundSource": {
    "id": "91f2c390-1590-4d54-8e5d-aa66c78e4573",
    "type": "maya-wallet",
    "description": "******84",
    "details": {
      "firstName": "Juan",
      "middleName": "dela",
      "lastName": "Cruz",
      "msisdn": "+639193890579",
      "email": "[email protected]",
      "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 [email protected]",
  "paymentTokenId": "******",
  "fundSource": {
    "id": "91f2c390-1590-4d54-8e5d-aa66c78e4573",
    "type": "maya-wallet",
    "description": "******84",
        "details": {
      "firstName": "Juan",
      "middleName": "Dela",
      "lastName": "Cruz",
      "msisdn": "+639193890579",
      "email": "[email protected]",
      "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.