Trang này chưa có bản Tiếng Việt; bên dưới là bản English.
API Documentation
How merchants connect to this platform. There are two APIs:
- Payout API std1: apply for a payout, query a payout, query your balance; we call you back when a payout has a result. New merchants use this one. See Payout API std1.
- Collection API compat1 (legacy protocol): create an order, query it, query your balance; we call you back when the payer has paid. Merchants already integrated with the old system's collection API keep using it: only the address changes, not your code. See Collection API compat1.
Addresses of this platform
| Item | Value |
|---|---|
| API address (gateway) | https://api.xx2system.xyz |
| Callback source IPs | 47.242.183.76 |
| Merchant portal | https://merchant.xx2system.xyz |
| This documentation | https://document.xx2system.xyz |
| What a new merchant ID looks like | MCH58001 |
| Platform currency | CNY |
- Send every request to the “API address” above; each API page gives the path. Both http and https work; https is recommended.
- Our callbacks come from the “callback source IPs” above. If you allow-list callback sources, add them.
Before you start
- Merchant ID: the operator gives it to you. New merchant IDs look like
MCH58001; merchants moved from the old system keep their ID. - API key: one per merchant, shared by the payout API std1 and the collection API compat1, shown under “Merchant › Security” in the merchant portal. New merchants get a 64-character hex string; merchants moved from the old system keep their existing merchant private key. Keep the key on your servers only, never in a web page or a mobile app.
- IP allow-list: give the operator the outbound IPs of the servers that call the API. While your payout list is empty, every payout request is rejected.
- Callback URL: reachable from the internet; reply
successonce you have processed a callback.
Conventions
- Amounts are integers in the currency's minor unit: for a two-decimal currency
10000means 100.00. - Times: std1 uses
yyyy-MM-dd HH:mm:ssin Beijing time (UTC+8); in the legacy protocolreqTimeisyyyyMMddHHmmssandpaySuccTimeis milliseconds. - Character set: UTF-8.
- Signatures differ between the two APIs; see Signatures.
- When a result is uncertain, query first. Never resubmit under a new order number.
Where to start
| You want to | Read in this order |
|---|---|
| Integrate payouts | Signatures → Payout API std1 → Callbacks → Error codes; ready-made SDKs |
| Move from the old system | Moving from the old system (one page, read it first) → Collection API compat1 |