Crypto Deposit Orders
The SureLink Gateway allows merchants to generate dedicated on-chain deposit addresses for cryptocurrency assets (USDT). The gateway monitors blockchain transactions in real time and automatically credits the merchant's available balance upon sufficient block confirmations.
1. Sequence Flow
mermaid
sequenceDiagram
autonumber
participant Merchant as Merchant System
participant Gateway as SureLink Gateway
participant Blockchain as Blockchain (TRON / ETH)
Merchant->>Gateway: 1. POST /api/v1/crypto-deposit-orders (Create deposit order)
Gateway-->>Merchant: 2. Return walletAddress and expiration time
Merchant-->>Merchant: 3. Render deposit QR code & address to user
Blockchain->>Gateway: 4. User transfers crypto; gateway scans block (DETECTED)
Blockchain->>Gateway: 5. Safe block confirmation count reached
Gateway->>Gateway: 6. Credit merchant ledger balance (COMPLETED)
Gateway->>Merchant: 7. Webhook dispatches deposit completion event2. Create Crypto Deposit Order
POST /api/v1/crypto-deposit-orders
Provisions a dedicated on-chain wallet address for this deposit request.
Headers
Standard HMAC authentication headers and Idempotency-Key.
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Target blockchain code (e.g., "TRON", "ETH", "BSC"), obtained from GET /api/v1/chains. |
amount | string | Yes | Expected deposit quantity (USDT), with 2 to 6 decimal places (e.g., "100.00", "50.123456"). |
Request Example
bash
curl -X POST "https://api-sandbox.surelink.io/api/v1/crypto-deposit-orders" \
-H "Content-Type: application/json" \
-H "X-Api-Key: mch_key_your_api_key" \
-H "X-Timestamp: 1715000000000" \
-H "X-Nonce: 9f8e7d6c5b4a392817263544a1b2c3d4" \
-H "X-Signature: c8b9...f01" \
-H "Idempotency-Key: CRYPTO_DEP_001" \
-d '{
"chain": "TRON",
"amount": "100.00"
}'typescript
import { sendSignedRequest } from './signer';
const result = await sendSignedRequest({
apiKey: 'mch_key_...',
apiSecret: 'sec_...',
method: 'POST',
url: 'https://api-sandbox.surelink.io/api/v1/crypto-deposit-orders',
body: {
chain: 'TRON',
amount: '100.00'
}
});Response
- Status Code:
201 Created
json
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"orderNo": "CD202610110001",
"ownerType": "MERCHANT",
"ownerId": "mch_12345",
"chain": "TRON",
"assetSymbol": "USDT",
"expectedAmount": "100.000000",
"creditedAmount": null,
"status": "PENDING_DEPOSIT",
"walletAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"txHash": null,
"expiresAt": "2026-10-11T10:00:00.000Z",
"completedAt": null,
"createdAt": "2026-10-11T09:00:00.000Z",
"updatedAt": "2026-10-11T09:00:00.000Z"
}3. List Crypto Deposit Orders
GET /api/v1/crypto-deposit-orders
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | number | No | 1 | Page number (starts at 1) |
pageSize | number | No | 20 | Items per page (max 100) |
chain | string | No | - | Filter by chain code (e.g., TRON) |
status | string | No | - | Filter by order status (e.g., COMPLETED) |
4. Query Crypto Deposit Order Details
GET /api/v1/crypto-deposit-orders/:id
Retrieve details for a specific crypto deposit order by its ID or order number.
Response
json
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"orderNo": "CD202610110001",
"ownerType": "MERCHANT",
"ownerId": "mch_12345",
"chain": "TRON",
"assetSymbol": "USDT",
"expectedAmount": "100.000000",
"creditedAmount": "100.000000",
"status": "COMPLETED",
"walletAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"txHash": "0x5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d",
"expiresAt": "2026-10-11T10:00:00.000Z",
"completedAt": "2026-10-11T09:05:32.000Z",
"createdAt": "2026-10-11T09:00:00.000Z",
"updatedAt": "2026-10-11T09:05:32.000Z"
}5. Status Matrix
| Status | Description | Terminal? |
|---|---|---|
PENDING_DEPOSIT | Address generated; awaiting transfer detection on-chain | No |
DETECTED | Inbound transaction detected; waiting for required block confirmations | No |
MANUAL_REVIEW | Discrepancy detected or compliance flag; awaiting admin review | No |
COMPLETED | Deposit confirmed and credited to balance | Yes |
EXPIRED | Address expired without detecting valid transactions | Yes |
CANCELLED | Order cancelled | Yes |
