https://sandbox.cdp.coinbase.com
Prerequisites
Before you begin, you’ll need:CDP CLI
CDP CLI
Install the CDP CLI (requires Node.js 22+):Configure a Sandbox environment using your CDP Secret API Key JSON file from the CDP Portal:
A funded Sandbox account
A funded Sandbox account
See the Custodial Accounts Quickstart for setting up a Sandbox account with funds.Set the account ID:
1. Create a transfer to a crypto address
Send USDC from the funded account to an external on-chain address. In Sandbox, use these reserved addresses to test specific outcomes:| Reserved address | Outcome |
|---|---|
0x1111111111111111111111111111111111111111 | Success |
0x2222222222222222222222222222222222222222 | Invalid target |
0x3333333333333333333333333333333333333333 | Invalid address |
0x4444444444444444444444444444444444444444 | Unsupported network |
Example response
Example response
2. Create a transfer to an email
Send USDC to a Coinbase user by email. In Sandbox, use these reserved test emails to avoid privacy issues with real addresses:| Test email | Outcome |
|---|---|
testuser1@domain.com | Success |
sandboxinvalidtarget@domain.com | Invalid email |
sandboxexecutionfails@domain.com | Validation passes, execution fails |
3. Create a fiat withdrawal to a payment method
Withdraw USD from the account to a bank-rail payment method (Fedwire, SWIFT, or SEPA). The rail is determined by the payment method itself. Sandbox auto-provisions mock payment methods on every entity. List them and pick one to use:4. Validate before executing
UsevalidateOnly: true to verify recipient details before committing a transfer. This is useful for preflight checks on user-entered addresses or emails:
200 response means the transfer would succeed. A 4xx response contains an errorType explaining why validation failed.
validateOnly and execute are mutually exclusive. Do not set both to true.5. Check transfer status
Poll the transfer to see its current status:6. Handle webhooks
In production, subscribe topayments.transfers.* events to receive real-time status updates rather than polling. See Webhooks for setup.
Events fired for a successful transfer:
payments.transfers.processing, transfer is executingpayments.transfers.completed, transfer succeeded
payments.transfers.processing, transfer is executingpayments.transfers.failed, transfer failed; inspectfailureReason
7. List transfers
View all transfers for your entity:Move to production
To run this flow on real rails, switch from the Sandbox base URL to the production base URL and use a production API key. Production transfers move real funds: crypto targets settle on-chain, email targets credit real Coinbase users, and payment method targets execute on Fedwire, SWIFT, or SEPA.What to read next
Transfers overview
Transfer types, fee quotes, travel rule, and lifecycle
Deposit Destinations
Receive inbound crypto into a custodial account
Webhooks
Subscribe to real-time transfer status events
REST API reference
Create, execute, list, and get transfers