Skip to main content
This guide walks you through listing your available payment methods and testing a fiat withdrawal transfer in Sandbox. The Sandbox uses pre-provisioned mock payment methods and does not connect to any real bank or payment network. Base URL: https://sandbox.cdp.coinbase.com

Prerequisites

Before you begin, you’ll need:
Install the CDP CLI (requires Node.js 22+):
Configure a Sandbox environment using your CDP Secret API Key JSON file from the CDP Portal:
Keep the API key secret. Never commit it to source control.
Install the SDK (requires Node.js 22+):
Export your API key credentials. CdpClient reads them from the environment automatically:
Initialize the client pointed at Sandbox:
main.ts
Keep API keys secret. Never commit them to source control.
See the Custodial Accounts Quickstart for setting up a Sandbox account with funds.Set the account ID:

1. List payment methods

In Sandbox, test payment methods are pre-configured based on your entity’s region. List them to find the IDs you’ll use in transfers:
Sandbox includes both active and inactive payment methods so you can test both success and failure paths.
Save the payment method IDs you’ll use in the next steps:

2. Test a successful fiat withdrawal

Transfer from your USD account to the active Fedwire payment method:
The transfer completes, your account balance decreases by $5, and you receive webhook events: payment.transfer.processingpayment.transfer.completed.

3. Test a failed transfer (error handling)

Transfer to the inactive payment method to test how your integration handles errors:

Sandbox payment method reference

US entities

EU entities

Move to production

To run this flow against real banks, switch from the Sandbox base URL to the production base URL and use a production API key. Production payment methods are real bank accounts you set up in the Coinbase Prime UI.

Payment methods overview

Concepts, types, and core operations

Transfers quickstart

Test crypto and email transfers too

Transfers overview

All transfer types, rails, and lifecycle

REST API reference

Full Payment Methods API reference