Create a single crypto payment for an order, invoice, product or service.
Open One-Time Payments API Test in API Console
POST /api/v1/payment-orders
X-API-KEY: mch_live_...
Content-Type: application/json
{
"externalId": "INV-10025",
"asset": "USDT-TRC20",
"amount": "10",
"expiresInMinutes": 60
}Plans, recurring authorizations, mandatory wallet login, funding-asset selection, six-digit PIN approval, upgrades, pauses and cancellations.
Open Interactive Subscription API
One-time payment: authenticate using X-API-KEY, create a payment with POST /api/v1/payment-orders, display the returned address and exact amount, then poll its status or consume signed webhooks.
This endpoint is for a single payment only. Recurring payments are available in the Subscriptions API section.
<?php
$payload = json_encode([
'externalId' => 'INV-10025',
'externalCustomerId' => 'CUSTOMER-458',
'asset' => 'USDT-TRC20',
'amount' => '10',
'expiresInMinutes' => 60,
]);
$ch = curl_init('https://api.trustbill.net/api/v1/payment-orders');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-KEY: mch_live_...', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);const response = await fetch('https://api.trustbill.net/api/v1/payment-orders', {
method: 'POST',
headers: { 'X-API-KEY': process.env.TRUSTBILL_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ externalId: 'INV-10025', externalCustomerId: 'CUSTOMER-458', currency: 'USD', amount: '10', asset: 'USDT-TRC20', expiresInMinutes: 60 }),
});
const order = await response.json();import os, requests
response = requests.post(
'https://api.trustbill.net/api/v1/payment-orders',
headers={'X-API-KEY': os.environ['TRUSTBILL_API_KEY']},
json={'externalId': 'INV-10025', 'externalCustomerId': 'CUSTOMER-458', 'currency': 'USD', 'amount': '10', 'asset': 'USDT-TRC20', 'expiresInMinutes': 60},
)
order = response.json()Keep API keys server-side. Never expose a live key in browser JavaScript or mobile applications. Verify webhook signatures against the exact raw request body before parsing JSON. Use a unique externalId for reconciliation.