Pay with USDT API
Overview
The 88Pay Crypto Payment API enables merchants to accept cryptocurrency payments from their customers quickly and securely. This API is designed for seamless integration with web or mobile platforms, allowing businesses to offer flexible payment options using digital assets.
With support for leading cryptocurrencies such as Tether (USDT), the API handles the entire crypto transaction lifecycle—from order creation to final payment confirmation and webhook notifications.
Payment Flow
To accept crypto payments via the API, follow these steps:
1. Create an Order
The merchant must first create a payment order by sending a POST
request to the /payment/create
endpoint.
Endpoint
POST /payment/create
Request Body
{
"country": "MEX",
"origin": "api",
"amount": "200",
"email": "example@gmail.com",
"merchantIdCustom": "1X1X1X1X1X1"
}
Parameters
Field | Type | Description |
---|---|---|
country | string | ISO 3166-1 alpha-3 country code (e.g., "MEX" for Mexico). |
origin | string | The source of the request (e.g., "api" or "web" ). |
amount | string | Amount to be paid, in USD. Use string format for consistency. |
email | string | Customer's email address. |
merchantIdCustom | string | Custom merchant identifier (used for internal tracking by the merchant). |
Example Response
{
"status": true,
"hash": "U2FsdGVkX1+encrypted+token+data==",
"message": "Order created successfully"
}
Note: The
hash
returned in this response is required in the next step.
2. Process the Payment
Use the hash obtained in the previous step to generate a checkout URL where the user will complete the payment.
Endpoint
POST /processor
Request Body
{
"hash": "U2FsdGVkX1+encrypted+token+data==",
"paymentMethod": "usdt",
"typePayment": "wallet",
"typeTransaction": "cashin",
"description": "Account deposit 564153131",
"merchantId": "2X2X2X2"
}
Parameters
Field | Type | Description |
---|---|---|
hash | string | Encrypted token obtained from /payment/create . |
paymentMethod | string | Cryptocurrency code (e.g., "usdt" ). |
typePayment | string | Payment type. Use "wallet" for crypto wallet payments. |
typeTransaction | string | Type of transaction (e.g., "cashin" for deposits). |
description | string | Description of the transaction (e.g., "Account deposit 564153131" ). |
merchantId | string | Unique merchant ID assigned by 88Pay. |
Example Response
{
"status": true,
"url": "https://crypto.88pay.io/checkout/abc123xyz",
"message": "Redirect customer to this URL"
}
3. Redirect the Customer
Once the URL is obtained from the /processor
endpoint, the merchant should redirect the user to that link:
https://crypto.88pay.io/checkout/abc123xyz
The customer will be able to select their preferred cryptocurrency, view the conversion rate, and complete the payment on the 88Pay-hosted checkout page.
4. Receive Payment Confirmation
After the customer completes the transaction:
- 88Pay will verify the crypto payment on-chain.
- A confirmation callback will be sent to your backend (if webhooks are configured).
- The response includes transaction status, payment method, crypto amount received, and transaction hash.
5. Webhook Notifications (Optional but Recommended)
To receive real-time updates on payment status (e.g., success, pending, failure), you can configure a webhook URL in your merchant account settings.
Example Webhook Payload
{
"status": "success",
"merchantId": "2X2X2X2",
"amount": "200",
"cryptoAmount": "198.50",
"currency": "USDT",
"walletAddress": "TXn7GK2...d89x",
"transactionHash": "0x123456abcdef...",
"timestamp": "2025-05-01T22:05:30Z"
}
Possible status
values
"pending"
: Awaiting payment confirmation on the blockchain."success"
: Payment confirmed and funds received."failed"
: Payment failed or expired.
Supported Cryptocurrencies
Currently supported currencies:
- Tether (USDT) – Available on TRON (TRC20) and Ethereum (ERC20) networks.
Note: Network fees and exchange rates may apply depending on the blockchain used.
Security and Best Practices
- Always validate webhooks using a secret signature or token validation to avoid spoofing.
- Do not expose the hash to the frontend directly unless necessary and protected.
- Use HTTPS for all API requests and webhook endpoints.
- Store all transaction logs for traceability and reconciliation.