Payments API

Create Payment

URL: https://api.txthinking.com/payments/create

Method:POST

Content-Type: application/json

Request body:

{
    Key: 'API Key',
    OrderID: 'xxx',
    Webhook: 'https://xxx',
    USD: 1234
}

Field description:

Key: string, the API Key
OrderID: string, merchant's own internal order number
Webhook: string, callback address, receive order notification. Must be https, it is recommended that the url path contains unguessable strings such as: https://google.com/99754106633f94d350db34d548d6091a
USD: int, cents, 1 USD = 100 cents

Response body:

{
    To: '0x1234...',
    ETH: '0.1234...',
    USDT: '0.1234...',
    BNB: '0.1234...',
    BUSD: '0.1234...',
    USDP: '0.1234...',
    USDC: '0.1234...',
    USD: 1234
}

Field description:

To: string, user should send payment ETH / USDT / BUSD / USDP / USDC / BNB to this address
ETH: string, the ETH corresponding to the order
USDT: string, ERC20-USDT corresponding to the order
BUSD: string, ERC20-BUSD corresponding to the order
USDP: string, ERC20-USDP corresponding to the order
USDC: string, ERC20-USDC corresponding to the order
BNB: string, ERC20-BNB corresponding to the order
USD: int, original order amount

Webhook

URL: Webhook address when creating payment

Method:POST

Content-Type: application/json

Request body:

{
    Key: 'API Key',
    OrderID: 'xxx',
    Txn: 'xxx',
    From: 'xxx',
    To: 'xxx',
    B: 'xxx',
    ETH: '0.1234...',
    USDT: '0.1234...',
    BNB: '0.1234...',
    BUSD: '0.1234...',
    USDP: '0.1234...',
    USDC: '0.1234...',
    USD: 1234,
    Data: 'xxx'
}

Field description:

Key: string, the above API Key, merchants need to verify whether this Key is correct
OrderID: string, merchant's own internal order number
Txn: string, Transaction Hash
From: string, buyer's address
To: string, seller's address
B: string, currency paid by buyer, ETH / USDT / BNB / BUSD / USDP / USDC
ETH: string, the ETH corresponding to the order
USDT: string, ERC20-USDT corresponding to the order
BUSD: string, ERC20-BUSD corresponding to the order
USDP: string, ERC20-USDP corresponding to the order
USDC: string, ERC20-USDC corresponding to the order
BNB: string, ERC20-BNB corresponding to the order
USD: int, original order amount
Data: string, if the buyer pays ETH, this is the hexadecimal of the data carried in the original transaction, usually an empty string

Response:

As long as the http status code 200 status code is received, the notification is considered successful. If it fails, it will be notified again after 1 minute, up to 3 times.