API Reference
Endpoint Overview
| # | Endpoint | Path | Idempotency Key | Description |
|---|---|---|---|---|
| 1 | List Card Headers | /api/v1/openapi/card_headers/list | — | List available card headers |
| 2 | List Card Configs | /api/v1/openapi/card_configs/list | — | List packages under a header |
| 3 | List Cards | /api/v1/openapi/cards/list | — | List the merchant's cards (status / date / balance filters) |
| 4 | Apply Virtual Card | /api/v1/openapi/card/apply | ✅ Required | Async card open |
| 5 | Preview First Deposit | /api/v1/openapi/card/first_deposit/preview | — | Dry-run first-deposit fee / freeze |
| 6 | Create Recharge | /api/v1/openapi/card/recharge | ✅ Required | Async recharge |
| 7 | Get Card Info | /api/v1/openapi/card/info | — | Status polling |
| 8 | Webhook Events History | /api/v1/openapi/webhook_events/list | — | Debug webhook delivery |
| 9 | List Transactions | /api/v1/openapi/transactions/list | — | Transaction details across all cards |
| 10 | List Card Transactions | /api/v1/openapi/card/transactions/list | — | Transaction details for one card |
| 11 | Freeze Card | /api/v1/openapi/card/freeze | — | Freeze an active virtual card |
| 12 | Unfreeze Card | /api/v1/openapi/card/unfreeze | — | Unfreeze a user-frozen card |
| 13 | Send Sensitive-Info Code | /api/v1/openapi/card/sensitive/send_code | — | Second-factor code for retrieving PAN / CVV via card/info |
| 14 | Close Card | /api/v1/openapi/card/close | — | Irreversibly close a virtual card (async; refund after review) |
| 15 | Update Cardholder Name | /api/v1/openapi/card/holder_name/update | — | Change the platform's cardholder name (not sent to the issuer) |
| 16 | Generate Billing Address | /api/v1/openapi/card/billing_address/generate | — | Randomly generate one address in a country; not saved |
| 17 | Save Billing Address | /api/v1/openapi/card/billing_address/update | — | Create or replace the platform's billing address (not sent to the issuer) |
| 18 | Cardholder Requirement | /api/v1/openapi/cardholder/requirement | — | What a header requires from a cardholder |
| 19 | Upload Cardholder File | /api/v1/openapi/cardholder/files/upload | ✅ Required | Upload an ID image / proof of address (multipart) |
| 20 | Create Cardholder | /api/v1/openapi/cardholder/create | ✅ Required | Register an end customer as a cardholder |
| 21 | Update Cardholder | /api/v1/openapi/cardholder/update | ✅ Required | Change the profile field by field; retries a draft's registration |
| 22 | Delete Cardholder Draft | /api/v1/openapi/cardholder/delete | ✅ Required | Delete a cardholder whose registration has not completed |
| 23 | List Cardholders | /api/v1/openapi/cardholder/list | — | List your cardholders |
| 24 | Get Cardholder Detail | /api/v1/openapi/cardholder/detail | — | One cardholder with review / verification status |
| 25 | Check Cardholder | /api/v1/openapi/cardholder/check | — | Per-header dry run, no side effects |
| 26 | Submit Cardholder for Review | /api/v1/openapi/cardholder/submit | ✅ Required | Submit for review on one or more headers |
| 27 | Start Identity Verification | /api/v1/openapi/cardholder/kyc/init | ✅ Required | Start the verification a header requires |
| 28 | Cancel Identity Verification | /api/v1/openapi/cardholder/kyc/cancel | ✅ Required | Cancel a verification in progress |
| 29 | List Legacy Cards | /api/v1/openapi/cardholder/legacy_cards | — | Cards whose holder can be reused for a new cardholder |
| 30 | Random Billing Address | /api/v1/openapi/cardholder/billing_address/random | — | One random billing address for a header, to prefill billing_address on create or on apply without a cardholder |
Cardholders (v1.6)
Endpoints 18–29 register and review your end customers as cardholders for headers with cardholder_required=true; endpoint 30 also serves /card/apply without a cardholder. Start with the Cardholders guide.
Common Conventions
- Method: all endpoints are
POST - Content-Type:
application/json(both request and response); the only exception is/cardholder/files/upload, which takesmultipart/form-data - Auth: 4 signing headers per request (HMAC Authentication)
- Localization:
messagefollowsAccept-Language(e.g.zh-CN/zh-TW/en-US; fallbackX-Languageheader, then?lang=). When none is sent, messages are in English.error_keynever changes with language. - Response envelope:
json
// Success
{
"code": 0, // 0 = success
"message": "Success", // Localized, for humans only
"data": { ... } // Business payload
}
// Error
{
"code": 40000, // Business code, not the HTTP status
"message": "<localized text>",
"error_key": "card_is_closing" // Stable machine key — branch on this
}error_key is present on every error response and never on success. Check code first: most business errors (40000, 40001, 50000) come back with HTTP 200, so the HTTP status alone does not tell you whether the call succeeded.
| Situation | HTTP | code |
|---|---|---|
| Success (incl. idempotent replay) | 200 | 0 |
Business / validation rejection (cardholder errors may add a data object with details) | 200 | 40000 |
| Request body cannot be parsed | 200 | 40001 (validation_failed) |
| Authentication failure | 401 | 40100 (openapi_invalid_credentials) |
| Authenticated but not allowed | 403 | 40300 |
| Card not found / not owned (cardholder endpoints: cardholder / file / header) | 404 | 40400 (card_not_found, cardholder_not_found …) |
| Idempotency-Key conflict / in progress | 409 | 40900 |
Rate limited (Retry-After header set) | 429 | 42900 (too_many_requests) |
| Server-side failure handled by the endpoint | 200 | 50000 |
| Unhandled server crash | 500 | 50000 (internal_error) |
See Error Codes for the full error_key dictionary.
Pagination
All */list endpoints (except /card_configs/list) support pagination (/cardholder/list caps page_size above 100 to 100; /cardholder/legacy_cards is not paginated):
| Field | Type | Default | Limit |
|---|---|---|---|
page | int | 1 | ≥ 1 (smaller values are treated as 1) |
page_size | int | 20 | 1–100. On /card_headers/list a value above 100 is capped to 100; on the other list endpoints an out-of-range value falls back to 20 |
Response includes:
json
{
"list": [...],
"total": 12,
"page": 1,
"page_size": 20,
"total_pages": 1,
"has_next": false,
"has_prev": false
}