Sandbox: PayTo Mandate

Outline the step to test PayTo in sandbox environment.

For PayTo, customer need to authorise the mandate in respective banking application. Since there is no way to link to bank's application in sandbox environment, Ezypay prepare a workaround to facilitate your testing for PayTo payment method. API below allows 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 Mandate

To cancel a PayTo mandate, 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 a PayTo Mandate

To agree on a PayTo mandate, 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.