Skip to main content

Onramp Reporting and Analytics

Transaction Status

The Transaction Status API provides developers with a 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 partnerUserId as a query parameter when initializing Coinbase 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 partnerUserId to reference a one-off session.

Method

GET

URL

https://api.developer.coinbase.com/onramp/v1/buy/user/{partner_user_id}/transactions?page_key={next_page_key}&page_size={page_size}

Request Parameters

The Transaction Status API is an RPC endpoint that accepts an argument as part of its URL path.

NameTypeReqDescription
partner_user_idStringYID 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.

OnrampTransaction Schema

NameDescriptionValue
statusCurrent status of the Onramp transaction.ONRAMP_TRANSACTION_STATUS_CREATED
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
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

Example Request/Response

curl -H "Authorization: Bearer $JWT" 'https://api.developer.coinbase.com/onramp/v1/buy/user/{partner_user_id}/transactions?page_key={next_page_key}&page_size={page_size}'

Transactions

The Transactions API provides clients with a 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 Transaction Status API.

Method

GET

URL

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}

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. 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 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.

OnrampTransaction Schema

NameDescriptionValue
statusCurrent status of the CBPay transaction.ONRAMP_TRANSACTION_STATUS_CREATED
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
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
wallet_addressThe address of the wallet the transaction was sent to.String

Example Request/Response

curl -H "Authorization: Bearer $JWT" 'https://api.developer.coinbase.com/onramp/v1/buy/user/transactions?page_key={next_page_key}&page_size={page_size}&start_date={start_date}&end_date={end_date}'

Was this helpful?