Select checkout crypto
curl --request POST \
--url https://api.wakapay.cash/checkout-sessions/{id}/select-crypto \
--header 'Content-Type: application/json' \
--data '
{
"crypto_currency": "USDT"
}
'import requests
url = "https://api.wakapay.cash/checkout-sessions/{id}/select-crypto"
payload = { "crypto_currency": "USDT" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({crypto_currency: 'USDT'})
};
fetch('https://api.wakapay.cash/checkout-sessions/{id}/select-crypto', 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/{id}/select-crypto",
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([
'crypto_currency' => 'USDT'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/{id}/select-crypto"
payload := strings.NewReader("{\n \"crypto_currency\": \"USDT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/{id}/select-crypto")
.header("Content-Type", "application/json")
.body("{\n \"crypto_currency\": \"USDT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wakapay.cash/checkout-sessions/{id}/select-crypto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"crypto_currency\": \"USDT\"\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>"
}
}{
"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"
}{
"statusCode": 401,
"message": "Missing X-Wakapay-Key, X-Wakapay-Timestamp, or X-Wakapay-Signature",
"error": "Unauthorized"
}Checkout
Select checkout crypto
Locks the crypto asset and payable amount for the session from the quoted crypto_options. Used by the payer during checkout. No merchant API key required.
POST
/
checkout-sessions
/
{id}
/
select-crypto
Select checkout crypto
curl --request POST \
--url https://api.wakapay.cash/checkout-sessions/{id}/select-crypto \
--header 'Content-Type: application/json' \
--data '
{
"crypto_currency": "USDT"
}
'import requests
url = "https://api.wakapay.cash/checkout-sessions/{id}/select-crypto"
payload = { "crypto_currency": "USDT" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({crypto_currency: 'USDT'})
};
fetch('https://api.wakapay.cash/checkout-sessions/{id}/select-crypto', 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/{id}/select-crypto",
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([
'crypto_currency' => 'USDT'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/{id}/select-crypto"
payload := strings.NewReader("{\n \"crypto_currency\": \"USDT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/{id}/select-crypto")
.header("Content-Type", "application/json")
.body("{\n \"crypto_currency\": \"USDT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wakapay.cash/checkout-sessions/{id}/select-crypto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"crypto_currency\": \"USDT\"\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>"
}
}{
"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"
}{
"statusCode": 401,
"message": "Missing X-Wakapay-Key, X-Wakapay-Timestamp, or X-Wakapay-Signature",
"error": "Unauthorized"
}Path Parameters
Checkout session UUID.
Body
application/json
Ticker the payer selects; must appear in the session crypto_options.
Available options:
BTC, USDT, BNB, SOL, USDC, ETH Example:
"USDT"
Response
Session updated with selected crypto.
Available options:
pending, waiting_payment, partial, paid, expired, failed Example:
"waiting_payment"
Example:
"API"
Example:
"8.33333333"
Example:
"USDT"
Show child attributes
Show child attributes
Example:
"XAF"
Example:
"5000.00000000"
Merchant receiving wallet.
Show child attributes
Show child attributes