Create Payment — USDT
สร้างคำขอชำระเงินคริปโต รับฝากและเครดิตเป็นสกุลเดียวกัน
https://testnet.trustsig.xyz/v1/payment/createInvoicePayment/cryptoAuthentication Status
API Key is required for all requests Webhook Secret
Headers
x-api-keyYour shop API key
x-signatureHMAC-SHA256 of timestamp|method|fullUrl|body signed with your secret key, sent as 64 hex characters
How to create the signaturex-timestampCurrent Unix time in milliseconds — must be the same value used to create x-signature
Parameters (Request Body)
order_idYour reference for this payment, for example a uuid. It must not match any payment already in the system. A reused order_id returns code 9000 (PAYMENT_EXISTS).
order_user_referenceYour ID for the customer. When you send it and one_time_address is not false, the customer gets their own deposit address on that chain, and every later payment for the same value uses that same address.
one_time_addressDefault true: the payment gets its own address, and a transfer within 0.5% of payment_amount still matches. Set it to false to use the shop's shared address; the system then adds random decimals to payment_amount, and the customer must send exactly that amount.
amountAmount in from_currency, sent as a string such as "1000". The system converts it to to_currency at the current rate and adds the shop's deposit fee (see fee_subtract). The customer must send payment_amount from the response. For a stablecoin on its own address, the system rounds payment_amount to whole coins, unless you sent decimals yourself with from_currency equal to to_currency. Leave amount out (or send "0") for an open amount: the customer sends any amount and the deposit sets it. An open amount needs one_time_address to stay true, otherwise you get code 9012. If the shop has a minimum crypto deposit, an amount below it in USD returns code 9040.
payer_pay_network_feeDefault false. When true, the system adds the chain's network fee to payment_amount so the customer pays it. It only applies when one_time_address is true.
from_currencyCurrency that amount is priced in.
to_currencyCoin the customer sends. Choose one that the selected chain supports.
chainBlockchain network. Use the chain value from GET /v1/chain/list, for example tron, ethereum or bsc.
Chain List (GET /v1/chain/list)fee_subtractPercent of the shop's deposit fee that is not added to what the customer pays. If you leave it out, the system uses 0 and adds the full fee to payment_amount. With 100 the customer pays the converted amount with no fee on top. The system always deducts the deposit fee when the deposit settles; this field only decides how much of it the customer covers.
discount_percentDiscount in percent, at most 100. The default is 0. The system takes it off payment_amount after the fee is added.
lifetimeHow long the payment stays open, in seconds. The default is 3600 (1 hour).
payment_domainStored with the payment for your reference only. It does not change payment_url; the system chooses the payment page domain itself.
url_returnURL to return the customer to after payment. Optional; empty by default.
url_successRedirect URL for a successful payment. Optional; empty by default.
url_failedRedirect URL for a failed payment. Optional; empty by default.
additional_dataAny extra data to keep with the payment, stored as sent. Do not use the keys source or p2p_topup; the system uses them.
display.colorPayment page colour, sent as "primary" or "primary,background", for example "blue,zinc". Primary: red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose. Background: gray, zinc, neutral.
display.themeColour mode of the payment page.
display.nameShop name shown on the payment page, up to 100 characters. The display object only changes how the page looks; it has no effect on the amount or the receiving address. An invalid value or an unknown key inside display returns 422.