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>"
}
'import requests
url = "https://api.hypermid.io/v1/onramp/checkout"
payload = {
"walletAddress": "<string>",
"cryptoToken": "USDC",
"cryptoChain": "base",
"fiatCurrency": "USD",
"fiatAmount": 50,
"email": "jsmith@example.com",
"paymentMode": "card",
"returnUrl": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
walletAddress: '<string>',
cryptoToken: 'USDC',
cryptoChain: 'base',
fiatCurrency: 'USD',
fiatAmount: 50,
email: 'jsmith@example.com',
paymentMode: 'card',
returnUrl: '<string>'
})
};
fetch('https://api.hypermid.io/v1/onramp/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hypermid.io/v1/onramp/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'walletAddress' => '<string>',
'cryptoToken' => 'USDC',
'cryptoChain' => 'base',
'fiatCurrency' => 'USD',
'fiatAmount' => 50,
'email' => 'jsmith@example.com',
'paymentMode' => 'card',
'returnUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hypermid.io/v1/onramp/checkout"
payload := strings.NewReader("{\n \"walletAddress\": \"<string>\",\n \"cryptoToken\": \"USDC\",\n \"cryptoChain\": \"base\",\n \"fiatCurrency\": \"USD\",\n \"fiatAmount\": 50,\n \"email\": \"jsmith@example.com\",\n \"paymentMode\": \"card\",\n \"returnUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hypermid.io/v1/onramp/checkout")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"walletAddress\": \"<string>\",\n \"cryptoToken\": \"USDC\",\n \"cryptoChain\": \"base\",\n \"fiatCurrency\": \"USD\",\n \"fiatAmount\": 50,\n \"email\": \"jsmith@example.com\",\n \"paymentMode\": \"card\",\n \"returnUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypermid.io/v1/onramp/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"walletAddress\": \"<string>\",\n \"cryptoToken\": \"USDC\",\n \"cryptoChain\": \"base\",\n \"fiatCurrency\": \"USD\",\n \"fiatAmount\": 50,\n \"email\": \"jsmith@example.com\",\n \"paymentMode\": \"card\",\n \"returnUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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
}
}
}
On-Ramp
Create Checkout
Create a fiat on-ramp checkout session
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>"
}
'import requests
url = "https://api.hypermid.io/v1/onramp/checkout"
payload = {
"walletAddress": "<string>",
"cryptoToken": "USDC",
"cryptoChain": "base",
"fiatCurrency": "USD",
"fiatAmount": 50,
"email": "jsmith@example.com",
"paymentMode": "card",
"returnUrl": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
walletAddress: '<string>',
cryptoToken: 'USDC',
cryptoChain: 'base',
fiatCurrency: 'USD',
fiatAmount: 50,
email: 'jsmith@example.com',
paymentMode: 'card',
returnUrl: '<string>'
})
};
fetch('https://api.hypermid.io/v1/onramp/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hypermid.io/v1/onramp/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'walletAddress' => '<string>',
'cryptoToken' => 'USDC',
'cryptoChain' => 'base',
'fiatCurrency' => 'USD',
'fiatAmount' => 50,
'email' => 'jsmith@example.com',
'paymentMode' => 'card',
'returnUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hypermid.io/v1/onramp/checkout"
payload := strings.NewReader("{\n \"walletAddress\": \"<string>\",\n \"cryptoToken\": \"USDC\",\n \"cryptoChain\": \"base\",\n \"fiatCurrency\": \"USD\",\n \"fiatAmount\": 50,\n \"email\": \"jsmith@example.com\",\n \"paymentMode\": \"card\",\n \"returnUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hypermid.io/v1/onramp/checkout")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"walletAddress\": \"<string>\",\n \"cryptoToken\": \"USDC\",\n \"cryptoChain\": \"base\",\n \"fiatCurrency\": \"USD\",\n \"fiatAmount\": 50,\n \"email\": \"jsmith@example.com\",\n \"paymentMode\": \"card\",\n \"returnUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypermid.io/v1/onramp/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"walletAddress\": \"<string>\",\n \"cryptoToken\": \"USDC\",\n \"cryptoChain\": \"base\",\n \"fiatCurrency\": \"USD\",\n \"fiatAmount\": 50,\n \"email\": \"jsmith@example.com\",\n \"paymentMode\": \"card\",\n \"returnUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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.
The fiat currency code (e.g.,
USD, EUR, GBP).The crypto asset symbol (e.g.,
ETH, USDC).The chain ID to receive crypto on.
The fiat amount to spend.
Payment method:
credit_card, debit_card, or bank_transfer.The wallet address to receive crypto.
URL to redirect the user to after payment. The order UID will be appended as a query parameter.
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);
curl -X POST "https://api.hypermid.io/v1/onramp/checkout" \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"fiatCurrency": "USD",
"cryptoAsset": "ETH",
"chainId": 1,
"fiatAmount": 100,
"paymentMethod": "credit_card",
"walletAddress": "0xYourAddress",
"redirectUrl": "https://yourapp.com/onramp/complete"
}'
body := `{
"fiatCurrency": "USD",
"cryptoAsset": "ETH",
"chainId": 1,
"fiatAmount": 100,
"paymentMethod": "credit_card",
"walletAddress": "0xYourAddress",
"redirectUrl": "https://yourapp.com/onramp/complete"
}`
req, _ := http.NewRequest("POST",
"https://api.hypermid.io/v1/onramp/checkout",
strings.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "your-api-key")
resp, _ := http.DefaultClient.Do(req)
Checkout URLs expire. Redirect the user promptly after creating the session.
Authorizations
Partner API key. Optional for public endpoints, required for /v1/partner/*.
Body
application/json
Destination wallet address
Example:
"USDC"
Example:
"base"
Example:
"USD"
Example:
50
Example:
"card"
Redirect URL after payment. Use UID as placeholder for the order ID.
⌘I