Sandbox: PayTo Agreement

Outline the step to test PayTo in sandbox environment.

For PayTo, customers need to authorise the mandate in their respective banking applications. Since there is no way to link to the bank's application in the sandbox environment, Ezypay prepared a workaround to facilitate your testing for the PayTo payment method. The API below allows the integrator to explicitly control the PayTo mandate status, mimicking customer behaviour of approving/rejecting a mandate in their bank's application.

API endpoint:
https://api-sandbox.ezypay.com/v2/npp/mandate/status/{{paymentMethodToken}}/mock

Remember to change the {{paymentMethodToken}} to the relevant token.

How to cancel a PayTo agreement

To cancel a PayTo agreement, you can use the following API request:.

curl --location --request POST 'https://api-sandbox.ezypay.com/v2/npp/mandate/status/{{paymentMethodToken}}/mock' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {{AuthenticationToken}}' \
--data-urlencode 'mandateStatus=CNCD'

When the above API request is executed, the integrator will receive a payment_method_invalid webhook event with the payToMandateStatus field set to CNCD.

How to agree to a PayTo agreement

To agree to a PayTo Agreement, you can use the following API request:

curl --location --request POST 'https://api-sandbox.ezypay.com/v2/npp/mandate/status/{{paymentMethodToken}}/mock' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {{AuthenticationToken}}' \
--data-urlencode 'mandateStatus=ACTV'

When the above API request is executed, the integrator will receive a payment_method_invalid webhook event with the payToMandateStatus field set to CNCD.