Skip to main content

Onramp Transaction Status

The Transaction Status API provides developers with a real time list of user Onramp transactions. Developers can poll the real time status of transactions and show users a view of their Coinbase Onramp transactions made within the client app. To link all transactions created during the session, developers must provide the (optional) field partnerUserRef as a query parameter when initializing Onramp, regardless of Coinbase-hosted or Headless Onramp. Transaction Status returns a paginated list of all transactions from newest to oldest. If the client app doesn’t have a concept of a user, clients can pass a random partnerUserRef to reference a one-off session. Call the Onramp Transaction Status API to get the transaction status.

Request Parameters

The Transaction Status API is an RPC endpoint that accepts an argument as part of its URL path.
NameTypeReqDescription
partner_user_refStringYID referring to user Onramp transactions in client app.
page_keyStringNReference to next page of transactions. Returned in previous page’s response.
page_sizeNumberNNumber of transactions to return per page. Default is 1.

Response Fields

The Transaction Status API returns a JSON response including the following fields.
NameDescription
transactionsList of OnrampTransactions in reverse chronological order.
next_page_keyA reference to the next page of transactions.
total_countThe total number of transactions made by the user.

Onramp Transaction Schema

NameDescriptionValue
statusStatus of the onramp transaction.ONRAMP_TRANSACTION_STATUS_IN_PROGRESS
ONRAMP_TRANSACTION_STATUS_SUCCESS
ONRAMP_TRANSACTION_STATUS_FAILED
purchase_currencyCrypto currency being purchased.String
purchase_networkNetwork used to deliver crypto to the user’s wallet.String
purchase_amountAmount of crypto currency being purchased.String
payment_totalTotal amount of fiat the user will pay.String
payment_subtotalAmount of fiat the user will pay, exclusive of feesString
coinbase_feeAmount of fiat charged to cover brokerage fees.String
network_feeAmount of fiat charged to cover network fees.String
exchange_rateUnit price of the crypto currency being purchased.String
countryCountry the user resides in.String
user_idUnique identifier representing the user.String
partner_user_refpartner_user_ref corresponds to the partnerUserRef parameter if one was originally included in the Onramp URL.String
payment_methodType of payment method the user is paying with.CARD
ACH_BANK_ACCOUNT
APPLE_PAY
FIAT_WALLET
CRYPTO_WALLET
tx_hashThe block hash of the onchain send.String
transaction_idUnique identifier for the onramp transactionString
wallet_addressThe address of the wallet the transaction was sent to.String
typeThe type of transaction.ONRAMP_TRANSACTION_TYPE_BUY_AND_SEND
ONRAMP_TRANSACTION_TYPE_SEND

Example Request/Response

cdpcurl -k /tmp/cdp_api_key.json 'https://api.developer.coinbase.com/onramp/v1/buy/user/{partner_user_ref}/transactions?page_key={next_page_key}&page_size={page_size}'

Onramp Transactions

The Transactions API provides clients with a historical list of Coinbase Onramp transactions between two dates. Transactions returns a paginated list of all transactions from newest to oldest. The Transactions API is indented for analytics purposes. If you need real time information about a specific transaction, use the Onramp Transaction Status API. Call the Onramp Transactions API to get the transaction status.

Request Parameters

NameTypeReqDescription
page_keyStringNReference to next page of transactions. Returned in previous page’s response.
page_sizeNumberNNumber of transactions to return per page. Default is 1000.
start_dateStringNThe start date (inclusive) of the range of transactions to return. YYYY-MM-DD format - UTC Timezone. Default is one month before end_date.
end_dateStringNThe end date (exclusive) of the range of transactions to return. YYYY-MM-DD format. Default is tomorrow.

Response Fields

The Transaction API returns a JSON response including the following fields.
NameDescription
transactionsList of OnrampTransactions in reverse chronological order.
next_page_keyA reference to the next page of transactions.

Onramp Transaction Schema

NameDescriptionValue
statusStatus of the buy transaction.ONRAMP_TRANSACTION_STATUS_SUCCESS
ONRAMP_TRANSACTION_STATUS_FAILED
purchase_currencyCrypto currency being purchased.String
purchase_networkNetwork used to deliver crypto to the user’s wallet.String
purchase_amountAmount of crypto currency being purchased.String
payment_totalTotal amount of fiat the user will pay.String
payment_subtotalAmount of fiat the user will pay, exclusive of feesString
coinbase_feeAmount of fiat charged to cover brokerage fees.String
network_feeAmount of fiat charged to cover network fees.String
exchange_rateUnit price of the crypto currency being purchased.String
countryCountry the user resides in.String
user_idUnique identifier representing the user.String
partner_user_refpartner_user_ref corresponds to the partnerUserRef parameter if one was originally included in the Onramp URL.String
payment_methodType of payment method the user is paying with.CARD
ACH_BANK_ACCOUNT
APPLE_PAY
FIAT_WALLET
CRYPTO_WALLET
tx_hashThe block hash of the onchain send.String
transaction_idUnique identifier for the onramp transactionString
wallet_addressThe address of the wallet the transaction was sent to.String
typeThe type of transaction.ONRAMP_TRANSACTION_TYPE_BUY_AND_SEND
ONRAMP_TRANSACTION_TYPE_SEND

Example Request/Response

cdpcurl -k /tmp/cdp_api_key.json 'https://api.developer.coinbase.com/onramp/v1/buy/transactions?page_key={next_page_key}&page_size={page_size}&start_date={start_date}&end_date={end_date}'