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

Request

  • Base URL
    https://api.grove.city (the document declares no server; this is the origin it was published from)
  • URL
    https://api.grove.city/v1/onramp/url
  • Auth
    none declared

Query parameters

amountstring required

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

payment_methodstring

Payment method: CARD (default) or ACH_BANK_ACCOUNT.

networkstring

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

tokenstring

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

Headers

authorizationstring nullable

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.

Changes

No recorded changes to this operation across all 1 revision of this API.