Quick Start
This guide will help you complete the basic integration of the Payment System API in 5 minutes.
📋 Prerequisites
Before you begin, make sure you have obtained the following information:
| Item | Description |
|---|---|
platform_id | Platform Merchant ID |
platform_key | Platform Secret Key (for signing) |
authorization | Authorization Token (required for request headers in some APIs) |
| API Endpoint | Sandbox/Production environment URL |
🔑 Signature Mechanism
All API requests must include a sign parameter. Steps to generate the signature:
- Sort all non-empty parameters in ASCII ascending order
- Concatenate using
key=valueformat, joined by& - Append the platform secret key at the end
- Perform MD5 encryption, output a 32-character lowercase string
For detailed instructions, refer to: Signature Specification
📥 Deposit Flow
sequenceDiagram
participant Merchant
participant PaymentSystem
participant User
Merchant->>PaymentSystem: 1. Create Deposit Order
PaymentSystem-->>Merchant: Return Payment URL
Merchant->>User: 2. Display Payment Page
User->>PaymentSystem: 3. Complete Payment
PaymentSystem->>Merchant: 4. Callback Notification
Merchant-->>PaymentSystem: Return SUCCESS
Create Deposit Order
curl -X POST https://api.your-domain.com/gateway/api/v1/payments \
-H "Content-Type: application/json" \
-d '{
"platform_id": "your_platform_id",
"service_id": "CN_BANK_DEPOSIT",
"merchant_order_id": "ORDER_12345",
"amount": 10000,
"notify_url": "https://your-domain.com/callback",
"sign": "your_calculated_sign"
}'
📤 Withdraw Flow
curl -X POST https://api.your-domain.com/gateway/api/v1/payouts \
-H "Content-Type: application/json" \
-d '{
"platform_id": "your_platform_id",
"service_id": "CN_BANK_WITHDRAW",
"merchant_order_id": "PAYOUT_12345",
"amount": 10000,
"bank_code": "ICBC",
"card_no": "6222021234567890123",
"card_holder": "Zhang San",
"notify_url": "https://your-domain.com/callback",
"sign": "your_calculated_sign"
}'
✅ Next Steps
- View the complete Deposit API Documentation
- View the complete Withdraw API Documentation
- Learn about Error Codes