curl --request POST \
--url https://api.tribridge.xyz/payments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": 99,
"currency": "USDC",
"redirect_url": "https://yoursite.com/order/8912",
"description": "Order #8912",
"customer_email": "jane@example.com",
"customer_name": "Jane Doe"
}
'import requests
url = "https://api.tribridge.xyz/payments"
payload = {
"amount": 99,
"currency": "USDC",
"redirect_url": "https://yoursite.com/order/8912",
"description": "Order #8912",
"customer_email": "jane@example.com",
"customer_name": "Jane Doe"
}
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: 99,
currency: 'USDC',
redirect_url: 'https://yoursite.com/order/8912',
description: 'Order #8912',
customer_email: 'jane@example.com',
customer_name: 'Jane Doe'
})
};
fetch('https://api.tribridge.xyz/payments', 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.tribridge.xyz/payments",
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' => 99,
'currency' => 'USDC',
'redirect_url' => 'https://yoursite.com/order/8912',
'description' => 'Order #8912',
'customer_email' => 'jane@example.com',
'customer_name' => 'Jane Doe'
]),
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.tribridge.xyz/payments"
payload := strings.NewReader("{\n \"amount\": 99,\n \"currency\": \"USDC\",\n \"redirect_url\": \"https://yoursite.com/order/8912\",\n \"description\": \"Order #8912\",\n \"customer_email\": \"jane@example.com\",\n \"customer_name\": \"Jane Doe\"\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.tribridge.xyz/payments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 99,\n \"currency\": \"USDC\",\n \"redirect_url\": \"https://yoursite.com/order/8912\",\n \"description\": \"Order #8912\",\n \"customer_email\": \"jane@example.com\",\n \"customer_name\": \"Jane Doe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tribridge.xyz/payments")
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\": 99,\n \"currency\": \"USDC\",\n \"redirect_url\": \"https://yoursite.com/order/8912\",\n \"description\": \"Order #8912\",\n \"customer_email\": \"jane@example.com\",\n \"customer_name\": \"Jane Doe\"\n}"
response = http.request(request)
puts response.read_body{
"id": "b3f1c2a0-1d4e-4f2a-9c8b-2e7a6f5d4c3b",
"merchant_id": "6c1f2d88-3a41-4f5e-9a5b-0d2c7e91f4a2",
"amount": "99.00",
"currency": "USDC",
"description": "Order #8912",
"status": "pending",
"is_test": true,
"redirect_url": "https://yoursite.com/order/8912",
"coin_symbol": "USDC",
"processing_fee_enabled": false,
"customer_email": "jane@example.com",
"customer_name": "Jane Doe",
"expires_at": "2026-08-25T12:30:00.000Z",
"created_at": "2026-08-25T12:00:00.000Z",
"checkout_url": "https://tribridge.xyz/gateway?payment_id=b3f1c2a0-1d4e-4f2a-9c8b-2e7a6f5d4c3b"
}Create a checkout session
Create a payment with your API key and get a hosted checkout URL to send your customer.
curl --request POST \
--url https://api.tribridge.xyz/payments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": 99,
"currency": "USDC",
"redirect_url": "https://yoursite.com/order/8912",
"description": "Order #8912",
"customer_email": "jane@example.com",
"customer_name": "Jane Doe"
}
'import requests
url = "https://api.tribridge.xyz/payments"
payload = {
"amount": 99,
"currency": "USDC",
"redirect_url": "https://yoursite.com/order/8912",
"description": "Order #8912",
"customer_email": "jane@example.com",
"customer_name": "Jane Doe"
}
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: 99,
currency: 'USDC',
redirect_url: 'https://yoursite.com/order/8912',
description: 'Order #8912',
customer_email: 'jane@example.com',
customer_name: 'Jane Doe'
})
};
fetch('https://api.tribridge.xyz/payments', 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.tribridge.xyz/payments",
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' => 99,
'currency' => 'USDC',
'redirect_url' => 'https://yoursite.com/order/8912',
'description' => 'Order #8912',
'customer_email' => 'jane@example.com',
'customer_name' => 'Jane Doe'
]),
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.tribridge.xyz/payments"
payload := strings.NewReader("{\n \"amount\": 99,\n \"currency\": \"USDC\",\n \"redirect_url\": \"https://yoursite.com/order/8912\",\n \"description\": \"Order #8912\",\n \"customer_email\": \"jane@example.com\",\n \"customer_name\": \"Jane Doe\"\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.tribridge.xyz/payments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 99,\n \"currency\": \"USDC\",\n \"redirect_url\": \"https://yoursite.com/order/8912\",\n \"description\": \"Order #8912\",\n \"customer_email\": \"jane@example.com\",\n \"customer_name\": \"Jane Doe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tribridge.xyz/payments")
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\": 99,\n \"currency\": \"USDC\",\n \"redirect_url\": \"https://yoursite.com/order/8912\",\n \"description\": \"Order #8912\",\n \"customer_email\": \"jane@example.com\",\n \"customer_name\": \"Jane Doe\"\n}"
response = http.request(request)
puts response.read_body{
"id": "b3f1c2a0-1d4e-4f2a-9c8b-2e7a6f5d4c3b",
"merchant_id": "6c1f2d88-3a41-4f5e-9a5b-0d2c7e91f4a2",
"amount": "99.00",
"currency": "USDC",
"description": "Order #8912",
"status": "pending",
"is_test": true,
"redirect_url": "https://yoursite.com/order/8912",
"coin_symbol": "USDC",
"processing_fee_enabled": false,
"customer_email": "jane@example.com",
"customer_name": "Jane Doe",
"expires_at": "2026-08-25T12:30:00.000Z",
"created_at": "2026-08-25T12:00:00.000Z",
"checkout_url": "https://tribridge.xyz/gateway?payment_id=b3f1c2a0-1d4e-4f2a-9c8b-2e7a6f5d4c3b"
}checkout_url. Send the customer that URL: Tribridge takes over chain selection, the one-time deposit address, confirmation, and webhook delivery.
Before you start
- You need a merchant API key from Dashboard → API Keys:
tri_test_...(simulated test mode, no real funds) ortri_live_...(real mainnet payments). The key decides the mode — never the request body. - Minimum amount is $0.50. Global rate limit: 100 requests/minute per IP.
currencyis the label shown on the checkout page (use the stablecoin you price in, e.g.USDC). The payer settles 1:1 in the coin chosen at checkout (coin_symbol, defaultUSDC).
-d '{...}' bodies fail in cmd.exe. Use escaped quotes instead:curl -X POST https://api.tribridge.xyz/payments -H "Content-Type: application/json" -H "x-api-key: tri_test_your_key_here" -d "{\"amount\":25.00,\"currency\":\"USDC\",\"redirect_url\":\"https://yoursite.com/success\"}"
curl.exe --% ....What happens next
Send the customer to checkout_url
checkout_url. The customer picks a chain, sees the exact amount and one-time deposit address, and pays from any wallet.Optional — attach the payer's email
customer_email up front, or attach it later from your own UI via Save customer details while the payment is pending.Handle the outcome
payment.completed event (see Webhooks).Receipts
Ifcustomer_email is set (here or later), Tribridge emails the payer a payment receipt the moment the payment reaches completed — in both test and live mode. Test receipts are badged as test payments. Receipts are sent at most once per payment, and the payer can always download a copy from the hosted receipt page. You also receive a payment notification on your Tribridge account email.
redirect_url after completion — never trust the redirect alone. Always confirm via webhook or by fetching the session with Get checkout session server-side.Authorizations
Your merchant API key: tri_test_... (simulated test mode) or tri_live_... (real mainnet payments). Create it in your dashboard under API Keys. Shown once at creation — store it safely.
Body
Amount to charge. Minimum $0.50. The payer settles this amount 1:1 in the stablecoin chosen at checkout.
x >= 0.599
Label shown on the checkout page for the amount — use the stablecoin you price in (e.g. USDC or USDT). Display only; the payer always settles in the coin chosen at checkout.
"USDC"
Where the customer is sent after the payment completes. Always confirm fulfillment via webhook or a server-side status fetch — never trust the redirect.
"https://yoursite.com/order/8912"
Human-readable note shown on the checkout page.
"Order #8912"
Payer email. When present, the payer automatically receives a payment receipt once the payment completes.
254"jane@example.com"
Payer name, printed on the receipt.
120"Jane Doe"
Stablecoin the checkout defaults to. The customer can still switch assets at checkout for payments created with this API.
USDC, USDT Adds the 1% processing-fee surcharge to the checkout total. Omit to fall back to your merchant dashboard setting.
Response
Checkout session created
A payment (checkout session) as returned on creation.
Payment id.
Merchant-facing base amount (string decimal).
"99.00"
Display label shown on the checkout page.
"USDC"
pending, completed, expired, cancelled "pending"
Derived from the API key used to create the payment.
USDC, USDT Hosted checkout URL to send the customer to.

