curl --request POST \
--url https://api.wakapay.cash/checkout-sessions \
--header 'Content-Type: application/json' \
--header 'X-Wakapay-Key: <api-key>' \
--header 'X-Wakapay-Signature: <api-key>' \
--header 'X-Wakapay-Timestamp: <api-key>' \
--data '
{
"user": {
"id": "cust_123",
"email": "customer@example.com",
"username": "alice"
},
"items": [
{
"name": "Pro plan",
"quantity": 1,
"unit_price": 5000,
"product_id": "prod_pro"
}
],
"currency": "XAF",
"expires_in_minutes": 30,
"metadata": {
"order_id": "ord_1001"
}
}
'import requests
url = "https://api.wakapay.cash/checkout-sessions"
payload = {
"user": {
"id": "cust_123",
"email": "customer@example.com",
"username": "alice"
},
"items": [
{
"name": "Pro plan",
"quantity": 1,
"unit_price": 5000,
"product_id": "prod_pro"
}
],
"currency": "XAF",
"expires_in_minutes": 30,
"metadata": { "order_id": "ord_1001" }
}
headers = {
"X-Wakapay-Key": "<api-key>",
"X-Wakapay-Timestamp": "<api-key>",
"X-Wakapay-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Wakapay-Key': '<api-key>',
'X-Wakapay-Timestamp': '<api-key>',
'X-Wakapay-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user: {id: 'cust_123', email: 'customer@example.com', username: 'alice'},
items: [{name: 'Pro plan', quantity: 1, unit_price: 5000, product_id: 'prod_pro'}],
currency: 'XAF',
expires_in_minutes: 30,
metadata: {order_id: 'ord_1001'}
})
};
fetch('https://api.wakapay.cash/checkout-sessions', 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.wakapay.cash/checkout-sessions",
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([
'user' => [
'id' => 'cust_123',
'email' => 'customer@example.com',
'username' => 'alice'
],
'items' => [
[
'name' => 'Pro plan',
'quantity' => 1,
'unit_price' => 5000,
'product_id' => 'prod_pro'
]
],
'currency' => 'XAF',
'expires_in_minutes' => 30,
'metadata' => [
'order_id' => 'ord_1001'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Wakapay-Key: <api-key>",
"X-Wakapay-Signature: <api-key>",
"X-Wakapay-Timestamp: <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.wakapay.cash/checkout-sessions"
payload := strings.NewReader("{\n \"user\": {\n \"id\": \"cust_123\",\n \"email\": \"customer@example.com\",\n \"username\": \"alice\"\n },\n \"items\": [\n {\n \"name\": \"Pro plan\",\n \"quantity\": 1,\n \"unit_price\": 5000,\n \"product_id\": \"prod_pro\"\n }\n ],\n \"currency\": \"XAF\",\n \"expires_in_minutes\": 30,\n \"metadata\": {\n \"order_id\": \"ord_1001\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Wakapay-Key", "<api-key>")
req.Header.Add("X-Wakapay-Timestamp", "<api-key>")
req.Header.Add("X-Wakapay-Signature", "<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.wakapay.cash/checkout-sessions")
.header("X-Wakapay-Key", "<api-key>")
.header("X-Wakapay-Timestamp", "<api-key>")
.header("X-Wakapay-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user\": {\n \"id\": \"cust_123\",\n \"email\": \"customer@example.com\",\n \"username\": \"alice\"\n },\n \"items\": [\n {\n \"name\": \"Pro plan\",\n \"quantity\": 1,\n \"unit_price\": 5000,\n \"product_id\": \"prod_pro\"\n }\n ],\n \"currency\": \"XAF\",\n \"expires_in_minutes\": 30,\n \"metadata\": {\n \"order_id\": \"ord_1001\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wakapay.cash/checkout-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Wakapay-Key"] = '<api-key>'
request["X-Wakapay-Timestamp"] = '<api-key>'
request["X-Wakapay-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": {\n \"id\": \"cust_123\",\n \"email\": \"customer@example.com\",\n \"username\": \"alice\"\n },\n \"items\": [\n {\n \"name\": \"Pro plan\",\n \"quantity\": 1,\n \"unit_price\": 5000,\n \"product_id\": \"prod_pro\"\n }\n ],\n \"currency\": \"XAF\",\n \"expires_in_minutes\": 30,\n \"metadata\": {\n \"order_id\": \"ord_1001\"\n }\n}"
response = http.request(request)
puts response.read_body{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "waiting_payment",
"source": "API",
"from_payment_link": true,
"anonymous": true,
"requires_payer_identity": true,
"identity_options": [
"<string>"
],
"product_payment_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_amount_crypto": "8.33333333",
"crypto_currency": "USDT",
"crypto_options": [
{
"ticker": "USDT",
"id": "tether",
"unit_price_fiat": "600.00000000",
"amount": "8.33333333"
}
],
"fiat_currency": "XAF",
"total_amount_fiat": "5000.00000000",
"wallet_address": "<string>",
"supported_networks": [
"<string>"
],
"expires_at": "2023-11-07T05:31:56Z",
"overpaid": true,
"bound_tx_hash": "<string>",
"payer_wallet_address": "<string>",
"chain_id": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"telegram_id": "<string>",
"username": "<string>"
},
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_name": "<string>",
"organisation_deleted": true,
"owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkout_url": "https://checkout.wakapay.cash/pay/550e8400-e29b-41d4-a716-446655440000",
"items": [
{
"name": "<string>",
"quantity": 123,
"unit_price": "<string>",
"total_price": "<string>",
"product_id": "<string>"
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z"
}{
"statusCode": 401,
"message": "Missing X-Wakapay-Key, X-Wakapay-Timestamp, or X-Wakapay-Signature",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "Missing X-Wakapay-Key, X-Wakapay-Timestamp, or X-Wakapay-Signature",
"error": "Unauthorized"
}Create a checkout session
Merchant-only. Creates a crypto checkout session for an organisation API key. Returns a checkout_url to send the payer to hosted checkout, plus quoted crypto_options.
Auth: signed headers X-Wakapay-Key, X-Wakapay-Timestamp, X-Wakapay-Signature (HMAC-SHA256 of {timestamp}.{rawBody}).
curl --request POST \
--url https://api.wakapay.cash/checkout-sessions \
--header 'Content-Type: application/json' \
--header 'X-Wakapay-Key: <api-key>' \
--header 'X-Wakapay-Signature: <api-key>' \
--header 'X-Wakapay-Timestamp: <api-key>' \
--data '
{
"user": {
"id": "cust_123",
"email": "customer@example.com",
"username": "alice"
},
"items": [
{
"name": "Pro plan",
"quantity": 1,
"unit_price": 5000,
"product_id": "prod_pro"
}
],
"currency": "XAF",
"expires_in_minutes": 30,
"metadata": {
"order_id": "ord_1001"
}
}
'import requests
url = "https://api.wakapay.cash/checkout-sessions"
payload = {
"user": {
"id": "cust_123",
"email": "customer@example.com",
"username": "alice"
},
"items": [
{
"name": "Pro plan",
"quantity": 1,
"unit_price": 5000,
"product_id": "prod_pro"
}
],
"currency": "XAF",
"expires_in_minutes": 30,
"metadata": { "order_id": "ord_1001" }
}
headers = {
"X-Wakapay-Key": "<api-key>",
"X-Wakapay-Timestamp": "<api-key>",
"X-Wakapay-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Wakapay-Key': '<api-key>',
'X-Wakapay-Timestamp': '<api-key>',
'X-Wakapay-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user: {id: 'cust_123', email: 'customer@example.com', username: 'alice'},
items: [{name: 'Pro plan', quantity: 1, unit_price: 5000, product_id: 'prod_pro'}],
currency: 'XAF',
expires_in_minutes: 30,
metadata: {order_id: 'ord_1001'}
})
};
fetch('https://api.wakapay.cash/checkout-sessions', 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.wakapay.cash/checkout-sessions",
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([
'user' => [
'id' => 'cust_123',
'email' => 'customer@example.com',
'username' => 'alice'
],
'items' => [
[
'name' => 'Pro plan',
'quantity' => 1,
'unit_price' => 5000,
'product_id' => 'prod_pro'
]
],
'currency' => 'XAF',
'expires_in_minutes' => 30,
'metadata' => [
'order_id' => 'ord_1001'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Wakapay-Key: <api-key>",
"X-Wakapay-Signature: <api-key>",
"X-Wakapay-Timestamp: <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.wakapay.cash/checkout-sessions"
payload := strings.NewReader("{\n \"user\": {\n \"id\": \"cust_123\",\n \"email\": \"customer@example.com\",\n \"username\": \"alice\"\n },\n \"items\": [\n {\n \"name\": \"Pro plan\",\n \"quantity\": 1,\n \"unit_price\": 5000,\n \"product_id\": \"prod_pro\"\n }\n ],\n \"currency\": \"XAF\",\n \"expires_in_minutes\": 30,\n \"metadata\": {\n \"order_id\": \"ord_1001\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Wakapay-Key", "<api-key>")
req.Header.Add("X-Wakapay-Timestamp", "<api-key>")
req.Header.Add("X-Wakapay-Signature", "<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.wakapay.cash/checkout-sessions")
.header("X-Wakapay-Key", "<api-key>")
.header("X-Wakapay-Timestamp", "<api-key>")
.header("X-Wakapay-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user\": {\n \"id\": \"cust_123\",\n \"email\": \"customer@example.com\",\n \"username\": \"alice\"\n },\n \"items\": [\n {\n \"name\": \"Pro plan\",\n \"quantity\": 1,\n \"unit_price\": 5000,\n \"product_id\": \"prod_pro\"\n }\n ],\n \"currency\": \"XAF\",\n \"expires_in_minutes\": 30,\n \"metadata\": {\n \"order_id\": \"ord_1001\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wakapay.cash/checkout-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Wakapay-Key"] = '<api-key>'
request["X-Wakapay-Timestamp"] = '<api-key>'
request["X-Wakapay-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": {\n \"id\": \"cust_123\",\n \"email\": \"customer@example.com\",\n \"username\": \"alice\"\n },\n \"items\": [\n {\n \"name\": \"Pro plan\",\n \"quantity\": 1,\n \"unit_price\": 5000,\n \"product_id\": \"prod_pro\"\n }\n ],\n \"currency\": \"XAF\",\n \"expires_in_minutes\": 30,\n \"metadata\": {\n \"order_id\": \"ord_1001\"\n }\n}"
response = http.request(request)
puts response.read_body{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "waiting_payment",
"source": "API",
"from_payment_link": true,
"anonymous": true,
"requires_payer_identity": true,
"identity_options": [
"<string>"
],
"product_payment_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_amount_crypto": "8.33333333",
"crypto_currency": "USDT",
"crypto_options": [
{
"ticker": "USDT",
"id": "tether",
"unit_price_fiat": "600.00000000",
"amount": "8.33333333"
}
],
"fiat_currency": "XAF",
"total_amount_fiat": "5000.00000000",
"wallet_address": "<string>",
"supported_networks": [
"<string>"
],
"expires_at": "2023-11-07T05:31:56Z",
"overpaid": true,
"bound_tx_hash": "<string>",
"payer_wallet_address": "<string>",
"chain_id": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"telegram_id": "<string>",
"username": "<string>"
},
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_name": "<string>",
"organisation_deleted": true,
"owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkout_url": "https://checkout.wakapay.cash/pay/550e8400-e29b-41d4-a716-446655440000",
"items": [
{
"name": "<string>",
"quantity": 123,
"unit_price": "<string>",
"total_price": "<string>",
"product_id": "<string>"
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z"
}{
"statusCode": 401,
"message": "Missing X-Wakapay-Key, X-Wakapay-Timestamp, or X-Wakapay-Signature",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "Missing X-Wakapay-Key, X-Wakapay-Timestamp, or X-Wakapay-Signature",
"error": "Unauthorized"
}Authorizations
Organisation API public key (merchant).
Unix timestamp in milliseconds. Must be within ±5 minutes.
HMAC-SHA256 hex of {timestamp}.{rawBody} using the API key secret.
Headers
Optional idempotency key. Replaying the same key for the same organisation returns the existing session.
"order-42"
Body
Show child attributes
Show child attributes
1Show child attributes
Show child attributes
Quote currency for line items (e.g. XAF, USD). Crypto amounts are derived from this total.
"XAF"
{ "order_id": "ord_1001" }
Session lifetime in minutes.
5 <= x <= 1008030
Response
Checkout session created (or idempotent replay).
pending, waiting_payment, partial, paid, expired, failed "waiting_payment"
"API"
"8.33333333"
"USDT"
Show child attributes
Show child attributes
"XAF"
"5000.00000000"
Merchant receiving wallet.
Show child attributes
Show child attributes
Hosted checkout URL to open for the payer.
"https://checkout.wakapay.cash/pay/550e8400-e29b-41d4-a716-446655440000"
Show child attributes
Show child attributes