Testing
Simulated Failure Scenarios (Sandbox Only)
To help you test your integration, we support specific account name values that will trigger simulated payment failures in the sandbox environment.
These are not validated in production, and should only be used during development.
Triggering Failures via Account Name
Use the following account names when creating a beneficiary to simulate different failure scenarios:
Account Name | Simulated Failure |
---|---|
FAILURE_SIM_001 | Invalid account |
FAILURE_SIM_002 | Bank unavailable |
FAILURE_SIM_003 | Rejected by compliance |
FAILURE_SIM_004 | Returned by bank |
Example Request
curl --request POST \
--url https://api.cadanapay.com/v1/beneficiaries \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"paymentDetails": {
"preferredMethod": "bank",
"bank": {
"accountName": "FAILURE_SIM_003",
...
}
},
"kyc": {
"idType": "PASSPORT",
"firstName": "John",
"lastName": "Doe",
...
},
"name": "John Doe",
"countryCode": "MX",
"currency": "MXN"
}
'
This request will simulate a failure where the payment is rejected by compliance.
These simulation names are only recognized in the sandbox environment. They will be ignored silently in production.
Updated about 19 hours ago