For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/gateway/create-ramp.md.

Create a ramp

Organization tokenNo token

POST
/ramps

Creates an onramp that buys crypto with fiat, or an offramp that converts the user's stablecoin balance to fiat, through the given provider. The response's redirect_url is the provider page the user completes the ramp on.

An offramp tops any shortfall up from the user's CeFi balance first, which requires enough CeFi PYUSD, and returns a bridge_plan when the user's own cross-chain funds must move first: sign its payloads, submit them to POST /ramps/{id}/bridge/execute, then call POST /ramps/{id}/prepare.

An onramp has nothing to sign, and is subject to provider preconditions: phone verification, accepted provider terms, an active wallet, and amount limits.

Rate limit: counts against the Money movement limit, 20 a minute and 300 a day (user token, per user); 200 a minute and 3,000 a day (organization api key, per organization). See Rate limits.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

An access token from POST /v1/auth/api-key/token. An organization token lasts one hour and has no refresh token; a personal token can be refreshed.

Header Parameters

TM-On-Behalf-Of?string

Act as one of your organization's users. The value is the user_id returned when the user was created; the request then reads and writes that user's account. Requires an organization token and a user your organization created: 400 for a personal token, a repeated header or a non-UUID, 403 for a user outside your organization. Not accepted on organization-scoped routes.

Formatuuid

Request Body

application/json
  1. body

Request to create a ramp

payment_method*RampPaymentMethod

Rail the ramp is funded or paid out through. DeFi routes the provider from it, so it is the caller's only choice of venue. APPLE_PAY and GOOGLE_PAY are onramp-only and require a channel.

Value in"COINBASE""PAYPAL""APPLE_PAY""GOOGLE_PAY"
direction*string

onramp buys crypto with fiat. offramp sells crypto for fiat.

Value in"onramp""offramp"
amount*string

Decimal string. Fiat to spend on an onramp, or settlement stablecoin to sell on an offramp. Greater than 0 and at most 100000.

channel?string

Surface the request originates from. Required for APPLE_PAY and GOOGLE_PAY.

Value in"web""ios""android"

Response Body

Ramp created successfully

application/json
  1. response

A created ramp, with the provider page to complete it on

id*string

Ramp ID, used by every other ramp endpoint

Formatuuid
redirect_url*string

Provider page the user completes the sale on

bridge_plan?

Present when the user's own funds must move onto the settlement chain before the offramp transfer. Sign every payload and submit the signatures to POST /ramps/{id}/bridge/execute.

Example Request
curl -X POST 'https://api.truemarkets.co/v1/gateway/ramps' \  -H 'TM-On-Behalf-Of: 3f6d2c0e-8a41-4c2b-9f1e-2b7d5c0a9e11' \  -H 'Content-Type: application/json' \  -d '{  "payment_method": "COINBASE",  "direction": "onramp",  "amount": "100.50"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "redirect_url": "string",  "bridge_plan": {    "id": "string",    "payloads": [      {        "digest": "string",        "payload": "string"      }    ],    "steps": [      {        "kind": "string",        "amount": "string",        "asset_symbol": "string",        "dst_asset_symbol": "string",        "src_chain": "string"      }    ],    "shortfall": {      "amount": "string",      "asset_symbol": "string"    }  }}