Create a withdrawal to an external bank account.
Withdrawal Types:
- Withdraw to Self: Use
external_account_idfrom the External Accounts API - Send to Others: Use
external_account_idfrom a Recipient's bank account
The system automatically detects whether the bank account belongs to the customer or a recipient based on the external_account_id.
If destination_address_id is an External Account ID, then the asset, network, and country_code here should remain consistent with the External Account ID.
Sandbox Simulation
In sandbox environments, you can simulate different withdrawal states by appending a suffix to the Idempotency-Key header:
| Suffix | Simulated State | Description |
|---|---|---|
:FAILED | FAILED | Transaction failed |
:PENDING | PENDING | Transaction is held for risk review |
Example:
- Normal:
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000 - Simulate failure:
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000:FAILED - Simulate pending:
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000:PENDING
Important: When querying by idempotency_key, you must use the full key including the suffix. For example, if you created a withdrawal with 550e8400-e29b-41d4-a716-446655440000:FAILED, you must query with the same full key. Using only the UUID part will return 404 Not Found.
Note: Simulation suffixes are only available in sandbox environments and will be ignored in production.
