Skip to main content
POST
/
v1
/
onramp
/
checkout
Create a fiat-to-crypto checkout session
curl --request POST \
  --url https://api.hypermid.io/v1/onramp/checkout \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "walletAddress": "<string>",
  "cryptoToken": "USDC",
  "cryptoChain": "base",
  "fiatCurrency": "USD",
  "fiatAmount": 50,
  "email": "jsmith@example.com",
  "paymentMode": "card",
  "returnUrl": "<string>"
}
'
{
  "data": {
    "orderUid": "ord_abc123def456",
    "checkoutUrl": "https://checkout.rampnow.io/session/sess_xyz789",
    "fiatCurrency": "USD",
    "fiatAmount": 100,
    "cryptoAsset": "ETH",
    "chainId": 1,
    "estimatedCryptoAmount": "0.029615",
    "walletAddress": "0xYourAddress",
    "expiresAt": 1711236377,
    "status": "CREATED"
  },
  "error": null,
  "meta": {
    "requestId": "r8a9b0c1-d2e3-4567-1234-678901234567",
    "timestamp": 1711234578,
    "rateLimit": {
      "limit": 2000,
      "remaining": 1982,
      "reset": 1711234627
    }
  }
}
Creates a checkout session for a fiat-to-crypto purchase. Returns a checkoutUrl that you redirect the user to for payment completion.
fiatCurrency
string
required
The fiat currency code (e.g., USD, EUR, GBP).
cryptoAsset
string
required
The crypto asset symbol (e.g., ETH, USDC).
chainId
number
required
The chain ID to receive crypto on.
fiatAmount
number
required
The fiat amount to spend.
paymentMethod
string
required
Payment method: credit_card, debit_card, or bank_transfer.
walletAddress
string
required
The wallet address to receive crypto.
redirectUrl
string
URL to redirect the user to after payment. The order UID will be appended as a query parameter.
externalId
string
Your own reference ID for this order.
{
  "data": {
    "orderUid": "ord_abc123def456",
    "checkoutUrl": "https://checkout.rampnow.io/session/sess_xyz789",
    "fiatCurrency": "USD",
    "fiatAmount": 100,
    "cryptoAsset": "ETH",
    "chainId": 1,
    "estimatedCryptoAmount": "0.029615",
    "walletAddress": "0xYourAddress",
    "expiresAt": 1711236377,
    "status": "CREATED"
  },
  "error": null,
  "meta": {
    "requestId": "r8a9b0c1-d2e3-4567-1234-678901234567",
    "timestamp": 1711234578,
    "rateLimit": {
      "limit": 2000,
      "remaining": 1982,
      "reset": 1711234627
    }
  }
}
const checkout = await client.createOnrampCheckout({
  fiatCurrency: "USD",
  cryptoAsset: "ETH",
  chainId: 1,
  fiatAmount: 100,
  paymentMethod: "credit_card",
  walletAddress: "0xYourAddress",
  redirectUrl: "https://yourapp.com/onramp/complete",
  externalId: "order-12345",
});

// Redirect the user to complete payment
console.log("Redirect to:", checkout.data.checkoutUrl);
console.log("Track with order UID:", checkout.data.orderUid);
Checkout URLs expire. Redirect the user promptly after creating the session.

Authorizations

X-API-Key
string
header
required

Partner API key. Optional for public endpoints, required for /v1/partner/*.

Body

application/json
walletAddress
string
required

Destination wallet address

cryptoToken
string
required
Example:

"USDC"

cryptoChain
string
required
Example:

"base"

fiatCurrency
string
required
Example:

"USD"

fiatAmount
number
required
Example:

50

email
string<email>
paymentMode
string
Example:

"card"

returnUrl
string

Redirect URL after payment. Use UID as placeholder for the order ID.

Response

Checkout session created

data
object
required

Response payload (null on error)

error
object
required
meta
object
required