v1

latestOpenAPI 3.1.02026-07-13143194365.4 KB
onramp

Generate a Coinbase onramp URL (Session Token flow)

Generate a Coinbase hosted onramp URL for fiat-to-crypto funding.

How it works:

  1. Creates a session token bound to user's Smart Account earnings wallet
  2. Returns URL with session token embedded
  3. User completes purchase in Coinbase UI
  4. Funds are sent to user's Smart Account earnings wallet (non-custodial)
  5. Frontend auto-transfers the settled amount to server (tipping) wallet

ToS Compliance: Fiat onramp funds must first go to a non-custodial wallet (Smart Account earnings wallet) before being transferred to a custodial wallet (server/tipping).

Response: Returns onramp_url to redirect the user.

Testing: No E2E test - the onramp flow completes asynchronously in Coinbase's hosted UI. URL generation is covered by unit tests.

See: https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/generating-onramp-url

get/v1/onramp/url

Query parameters

amountstring required

Fiat amount to onramp in USD (e.g., '10.00').

Fiat amount to onramp in USD (e.g., '10.00').

payment_methodstring

Payment method: CARD (default) or ACH_BANK_ACCOUNT.

Payment method: CARD (default) or ACH_BANK_ACCOUNT.

networkstring

Target blockchain network (e.g., base, base-sepolia, ethereum).

Target blockchain network (e.g., base, base-sepolia, ethereum).

tokenstring

Token to purchase (e.g., USDC, ETH).

Token to purchase (e.g., USDC, ETH).

Headers

authorizationstring nullable

Bearer JWT issued by Grove.

Bearer JWT issued by Grove.

Response

Successful Response

onramp_urlstring required

Coinbase hosted onramp URL. Redirect user here to complete purchase. Contains session token bound to user's Smart Account earnings wallet.

event_idstring nullable

Onramp event ID for tracking settled amount and transfer idempotency.