Test Cases — Withdrawals

The sandbox test accounts and how to force each terminal state of a withdrawal.

Test the withdrawal flow in Sandbox with one set of accounts, always with institution 40012. Create the withdrawal, approve it, and the account you chose decides the outcome.

The full request, the response, the approval step, the status flow and the webhooks are covered in Withdrawals.

These accounts are for Mexico. For payouts in Chile and Argentina, sandbox test data comes from your Tonder contact — see Withdrawals in Chile and Argentina.

Sandbox test accounts

Valid only in Sandbox. Always use institution 40012.

AccountMethodExpected outcome
012969100000000110SPEIPAID_FULL
646969100000000214SPEIPAID_FULL
012969100000000013SPEIFAILED
012969100000000026SPEIREFUNDED, on its own, minutes to an hour after paying
4111111111111111DEBIT_CARDPAID_FULL

The outcomes are in the names the query endpoints use; the webhooks announce the same states as Success, Failed and Returned. See Two vocabularies.

The returning CLABE is the one that lets you exercise the third webhook, withdrawal_Returned, the case most integrations leave uncovered.

If this data is rejected, write to us before going on: your test account may need a different configuration.

Forcing each terminal state

Every case starts the same way: create the withdrawal, then act on it with POST /api/v1/withdrawals/perform_action/, sending the withdrawal id in the id field — the withdrawal_id of the /process/ response. See Approve.

Terminal stateHow to reach it
SuccessCreate with a CLABE that pays, then approve: {"id": "<withdrawal_id>", "action": "approve"}. It advances on its own to Success in seconds.
FailedCreate with the failing CLABE, then approve. Or, on any pending withdrawal: {"id": "<withdrawal_id>", "action": "fail"}.
DeclinedReject the withdrawal, regardless of the account: {"id": "<withdrawal_id>", "action": "reject"}.
CancelledCancel it while it is pending: {"id": "<withdrawal_id>", "action": "cancel"}.
ReturnedTwo ways. Create with the returning CLABE 012969100000000026, approve, and wait: it reaches Success and then moves to Returned on its own, minutes to an hour later. Or take any withdrawal to Success with approve, wait until it gets there, and then, on that same already-paid withdrawal: {"id": "<withdrawal_id>", "action": "refund"}. Either way the withdrawal moves to Returned and the withdrawal_Returned event is emitted.

Full chain for a returned withdrawal: Pending → Processing → Success → Returned.

Next steps

Was this page helpful?

On this page