Bind on-chain transaction
curl --request POST \
--url https://api.wakapay.cash/checkout-sessions/{id}/bind-tx \
--header 'Content-Type: application/json' \
--data '
{
"crypto_currency": "ETH",
"tx_hash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"payer_wallet_address": "0x12DaF51B28e904D7583040933595eC4624f91383",
"chain_id": "1"
}
'import requests
url = "https://api.wakapay.cash/checkout-sessions/{id}/bind-tx"
payload = {
"crypto_currency": "ETH",
"tx_hash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"payer_wallet_address": "0x12DaF51B28e904D7583040933595eC4624f91383",
"chain_id": "1"
}
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: 'ETH',
tx_hash: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
payer_wallet_address: '0x12DaF51B28e904D7583040933595eC4624f91383',
chain_id: '1'
})
};
fetch('https://api.wakapay.cash/checkout-sessions/{id}/bind-tx', 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}/bind-tx",
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' => 'ETH',
'tx_hash' => '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'payer_wallet_address' => '0x12DaF51B28e904D7583040933595eC4624f91383',
'chain_id' => '1'
]),
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}/bind-tx"
payload := strings.NewReader("{\n \"crypto_currency\": \"ETH\",\n \"tx_hash\": \"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n \"payer_wallet_address\": \"0x12DaF51B28e904D7583040933595eC4624f91383\",\n \"chain_id\": \"1\"\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}/bind-tx")
.header("Content-Type", "application/json")
.body("{\n \"crypto_currency\": \"ETH\",\n \"tx_hash\": \"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n \"payer_wallet_address\": \"0x12DaF51B28e904D7583040933595eC4624f91383\",\n \"chain_id\": \"1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wakapay.cash/checkout-sessions/{id}/bind-tx")
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\": \"ETH\",\n \"tx_hash\": \"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n \"payer_wallet_address\": \"0x12DaF51B28e904D7583040933595eC4624f91383\",\n \"chain_id\": \"1\"\n}"
response = http.request(request)
puts response.read_body{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bound_tx_hash": "<string>",
"crypto_currency": "ETH",
"total_amount_crypto": "0.01234567",
"status": "waiting_payment",
"idempotent": true
}{
"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
Bind on-chain transaction
Binds the payer’s broadcast transaction to the checkout session (and locks crypto if not already selected). Required so matching can attribute the transfer when multiple sessions share a merchant wallet. No merchant API key required.
POST
/
checkout-sessions
/
{id}
/
bind-tx
Bind on-chain transaction
curl --request POST \
--url https://api.wakapay.cash/checkout-sessions/{id}/bind-tx \
--header 'Content-Type: application/json' \
--data '
{
"crypto_currency": "ETH",
"tx_hash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"payer_wallet_address": "0x12DaF51B28e904D7583040933595eC4624f91383",
"chain_id": "1"
}
'import requests
url = "https://api.wakapay.cash/checkout-sessions/{id}/bind-tx"
payload = {
"crypto_currency": "ETH",
"tx_hash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"payer_wallet_address": "0x12DaF51B28e904D7583040933595eC4624f91383",
"chain_id": "1"
}
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: 'ETH',
tx_hash: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
payer_wallet_address: '0x12DaF51B28e904D7583040933595eC4624f91383',
chain_id: '1'
})
};
fetch('https://api.wakapay.cash/checkout-sessions/{id}/bind-tx', 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}/bind-tx",
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' => 'ETH',
'tx_hash' => '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'payer_wallet_address' => '0x12DaF51B28e904D7583040933595eC4624f91383',
'chain_id' => '1'
]),
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}/bind-tx"
payload := strings.NewReader("{\n \"crypto_currency\": \"ETH\",\n \"tx_hash\": \"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n \"payer_wallet_address\": \"0x12DaF51B28e904D7583040933595eC4624f91383\",\n \"chain_id\": \"1\"\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}/bind-tx")
.header("Content-Type", "application/json")
.body("{\n \"crypto_currency\": \"ETH\",\n \"tx_hash\": \"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n \"payer_wallet_address\": \"0x12DaF51B28e904D7583040933595eC4624f91383\",\n \"chain_id\": \"1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wakapay.cash/checkout-sessions/{id}/bind-tx")
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\": \"ETH\",\n \"tx_hash\": \"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n \"payer_wallet_address\": \"0x12DaF51B28e904D7583040933595eC4624f91383\",\n \"chain_id\": \"1\"\n}"
response = http.request(request)
puts response.read_body{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bound_tx_hash": "<string>",
"crypto_currency": "ETH",
"total_amount_crypto": "0.01234567",
"status": "waiting_payment",
"idempotent": true
}{
"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
Available options:
BTC, USDT, BNB, SOL, USDC, ETH Example:
"ETH"
0x-prefixed 64-character hex transaction hash.
Pattern:
^0x[a-fA-F0-9]{64}$Example:
"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
0x-prefixed 40-character hex payer address.
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x12DaF51B28e904D7583040933595eC4624f91383"
Chain ID the payment was sent on.
Example:
"1"