Skip to main content

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:

ItemDescription
platform_idPlatform Merchant ID
platform_keyPlatform Secret Key (for signing)
authorizationAuthorization Token (required for request headers in some APIs)
API EndpointSandbox/Production environment URL

🔑 Signature Mechanism

All API requests must include a sign parameter. Steps to generate the signature:

  1. Sort all non-empty parameters in ASCII ascending order
  2. Concatenate using key=value format, joined by &
  3. Append the platform secret key at the end
  4. 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