Skip to main content

Onramp Configurations

Buy Config

The Buy Config API returns the list of countries supported by Coinbase Onramp, and the payment methods available in each country. Clients can call this API periodically and cache the response so that they know which users to present the Coinbase Onramp option to.

Method

GET

URL

https://api.developer.coinbase.com/onramp/v1/buy/config

Request Parameters

The Buy Config API has no request parameters.

Response Fields

The Buy Config API returns a JSON response including the following fields.

NameDescription
countriesA list of supported countries, represented by their ISO 3166-1 two digit country code. Each country contains a list of payment method types available in that country; for the US it also contains a list of supported states.

Example Request/Response

curl -H "Authorization: Bearer $JWT" 'https://api.developer.coinbase.com/onramp/v1/buy/config'

Buy Options

The Buy Options API provides clients with a way to discover the available options for buying Crypto with Coinbase Onramp. It returns the supported fiat currencies and available crypto assets that can be passed into the Buy Quote API.

Method

GET

URL

https://api.developer.coinbase.com/onramp/v1/buy/config

Request Parameters

NameReqDescription
countryYISO 3166-1 two-digit country code string representing the purchasing user’s country of residence, e.g., US.
subdivisionNISO 3166-2 two-digit country subdivision code representing the purchasing user’s subdivision of residence within their country, e.g. NY. Required if the country=“US” because certain states (e.g., NY) have state specific asset restrictions.

Response Fields

The Buy Options API returns a JSON response including the following fields.

NameDescription
payment_currenciesList of supported fiat currencies that can be exchanged for crypto on Onramp in the given location. Each currency contains a list of available payment methods, with min and max transaction limits for that currency.
purchase_currenciesList of available crypto assets that can be bought on Onramp in the given location.

Example Request/Response

curl -H "Authorization: Bearer $JWT" 'https://api.developer.coinbase.com/onramp/v1/buy/options?country=US&subdivision=NY'

Was this helpful?