Create or replay a crypto checkout session
curl --request POST \
--url https://api.rach.finance/api/v1/checkout/create \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"amount": "49.95000001",
"reference": "<string>",
"callback_url": "<string>",
"customer_email": "jsmith@example.com",
"customer_name": "<string>",
"description": "<string>",
"embed_origin": "<string>",
"metadata": {},
"network": "<string>",
"payment_method": "crypto",
"return_url": "<string>"
}
'import requests
url = "https://api.rach.finance/api/v1/checkout/create"
payload = {
"amount": "49.95000001",
"reference": "<string>",
"callback_url": "<string>",
"customer_email": "jsmith@example.com",
"customer_name": "<string>",
"description": "<string>",
"embed_origin": "<string>",
"metadata": {},
"network": "<string>",
"payment_method": "crypto",
"return_url": "<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({
amount: '49.95000001',
reference: '<string>',
callback_url: '<string>',
customer_email: 'jsmith@example.com',
customer_name: '<string>',
description: '<string>',
embed_origin: '<string>',
metadata: {},
network: '<string>',
payment_method: 'crypto',
return_url: '<string>'
})
};
fetch('https://api.rach.finance/api/v1/checkout/create', 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.rach.finance/api/v1/checkout/create",
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([
'amount' => '49.95000001',
'reference' => '<string>',
'callback_url' => '<string>',
'customer_email' => 'jsmith@example.com',
'customer_name' => '<string>',
'description' => '<string>',
'embed_origin' => '<string>',
'metadata' => [
],
'network' => '<string>',
'payment_method' => 'crypto',
'return_url' => '<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.rach.finance/api/v1/checkout/create"
payload := strings.NewReader("{\n \"amount\": \"49.95000001\",\n \"reference\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_name\": \"<string>\",\n \"description\": \"<string>\",\n \"embed_origin\": \"<string>\",\n \"metadata\": {},\n \"network\": \"<string>\",\n \"payment_method\": \"crypto\",\n \"return_url\": \"<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.rach.finance/api/v1/checkout/create")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"49.95000001\",\n \"reference\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_name\": \"<string>\",\n \"description\": \"<string>\",\n \"embed_origin\": \"<string>\",\n \"metadata\": {},\n \"network\": \"<string>\",\n \"payment_method\": \"crypto\",\n \"return_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rach.finance/api/v1/checkout/create")
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 \"amount\": \"49.95000001\",\n \"reference\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_name\": \"<string>\",\n \"description\": \"<string>\",\n \"embed_origin\": \"<string>\",\n \"metadata\": {},\n \"network\": \"<string>\",\n \"payment_method\": \"crypto\",\n \"return_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"amount_exact": "49.95000001",
"currency": "<string>",
"invoice_currency": "<string>",
"is_test_mode": true,
"reference": "<string>",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"amount": 123,
"charged_amount_exact": "<string>",
"deposit_address": "<string>",
"embed_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"instructions": {},
"network": "<string>",
"payment_method": "crypto",
"payment_url": "<string>",
"qr_code": "<string>",
"return_url": "<string>"
}Checkout (Crypto Gateway)
Create or replay a crypto checkout session
Requires a merchant API key and eligible business. Decimal strings preserve exact amounts. Reuse the same Idempotency-Key and identical payload after a timeout. Reference and key are scoped to the merchant and test/live environment; conflicting details return409. API-key type fixes test/live mode. Browser flags cannot switch a session’s mode. Callback delivery is transactional and signed with the merchant webhook secret. Browser return URLs and iframe messages are display signals, not proof to fulfill an order.
POST
/
api
/
v1
/
checkout
/
create
Create or replay a crypto checkout session
curl --request POST \
--url https://api.rach.finance/api/v1/checkout/create \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"amount": "49.95000001",
"reference": "<string>",
"callback_url": "<string>",
"customer_email": "jsmith@example.com",
"customer_name": "<string>",
"description": "<string>",
"embed_origin": "<string>",
"metadata": {},
"network": "<string>",
"payment_method": "crypto",
"return_url": "<string>"
}
'import requests
url = "https://api.rach.finance/api/v1/checkout/create"
payload = {
"amount": "49.95000001",
"reference": "<string>",
"callback_url": "<string>",
"customer_email": "jsmith@example.com",
"customer_name": "<string>",
"description": "<string>",
"embed_origin": "<string>",
"metadata": {},
"network": "<string>",
"payment_method": "crypto",
"return_url": "<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({
amount: '49.95000001',
reference: '<string>',
callback_url: '<string>',
customer_email: 'jsmith@example.com',
customer_name: '<string>',
description: '<string>',
embed_origin: '<string>',
metadata: {},
network: '<string>',
payment_method: 'crypto',
return_url: '<string>'
})
};
fetch('https://api.rach.finance/api/v1/checkout/create', 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.rach.finance/api/v1/checkout/create",
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([
'amount' => '49.95000001',
'reference' => '<string>',
'callback_url' => '<string>',
'customer_email' => 'jsmith@example.com',
'customer_name' => '<string>',
'description' => '<string>',
'embed_origin' => '<string>',
'metadata' => [
],
'network' => '<string>',
'payment_method' => 'crypto',
'return_url' => '<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.rach.finance/api/v1/checkout/create"
payload := strings.NewReader("{\n \"amount\": \"49.95000001\",\n \"reference\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_name\": \"<string>\",\n \"description\": \"<string>\",\n \"embed_origin\": \"<string>\",\n \"metadata\": {},\n \"network\": \"<string>\",\n \"payment_method\": \"crypto\",\n \"return_url\": \"<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.rach.finance/api/v1/checkout/create")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"49.95000001\",\n \"reference\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_name\": \"<string>\",\n \"description\": \"<string>\",\n \"embed_origin\": \"<string>\",\n \"metadata\": {},\n \"network\": \"<string>\",\n \"payment_method\": \"crypto\",\n \"return_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rach.finance/api/v1/checkout/create")
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 \"amount\": \"49.95000001\",\n \"reference\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_name\": \"<string>\",\n \"description\": \"<string>\",\n \"embed_origin\": \"<string>\",\n \"metadata\": {},\n \"network\": \"<string>\",\n \"payment_method\": \"crypto\",\n \"return_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"amount_exact": "49.95000001",
"currency": "<string>",
"invoice_currency": "<string>",
"is_test_mode": true,
"reference": "<string>",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"amount": 123,
"charged_amount_exact": "<string>",
"deposit_address": "<string>",
"embed_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"instructions": {},
"network": "<string>",
"payment_method": "crypto",
"payment_url": "<string>",
"qr_code": "<string>",
"return_url": "<string>"
}Authorizations
Headers
Body
application/json
Response
Session created, or original session replayed.

