Overview
Brand OpenAPI v1.5 is a set of HMAC-authenticated HTTPS REST APIs focused on virtual card issuance, recharge and status queries. All endpoints are POST only; both requests and responses are application/json.
Key Characteristics
- POST-only: every endpoint is
POST— easy uniform middleware on both ends. - HMAC-SHA256 auth: 4 headers (
X-App-Id/X-Timestamp/X-Nonce/X-Signature) — no OAuth/JWT. - Idempotency: write endpoints require
Idempotency-Key, dedup window is 24 hours. - Prefixed resource IDs: every public resource has a business prefix (e.g.
card_12345,pkg_67); internal DB primary keys never leak. - Async webhook delivery: card open / recharge / close completion, card status changes and cardholder status changes are pushed actively; same HMAC-SHA256 signing.
- Cardholders (v1.6): register your end customers once, get them reviewed, and reuse them for many cards — required on headers with
cardholder_required=true. See Cardholders. - Unified envelope: success is
"code": 0; every error carries a businesscode(e.g.40000,40100,40400) plus a stableerror_key. Most business errors come back with HTTP 200, so checkcodefirst rather than relying on the HTTP status alone. - i18n errors: the human-readable
messageis localized viaAccept-Language(default English when no language is sent), whileerror_keystays stable across languages for programmatic checks.
Scope (v1.5)
Currently supported
Virtual cards only: virtual_l / virtual_p / virtual_v / virtual_r / virtual_g / virtual_a / virtual_s921
Not supported yet
- Physical cards (
master_e/visa_h) - Transfer endpoints (
transfer)
Recommended Reading Order
- Quick Start — make your first request in 5 minutes
- HMAC Authentication — required reading: signature input format
- IDs & Prefixes — resource identifier convention
- Idempotency — safe retries on write endpoints
- Error Codes —
error_keydictionary - Webhook Spec — receive async events
- Cardholders — needed for headers with
cardholder_required=true - API Reference — request/response schemas for all endpoints
Endpoint Prefix
{base_url}/api/v1/openapi/{endpoint}| Environment | base_url |
|---|---|
| Production | https://api.coinepay.net |
| Local dev | http://localhost:8801 |
Always use HTTPS
Call the production API over HTTPS only at https://api.coinepay.net. Your API key and the HMAC signature travel in request headers — a plain-HTTP request would leak them in transit. Pin the host exactly: do not add a trailing slash to base_url, and never substitute a look-alike domain.
Sandbox
v1.5 does not ship a separate sandbox. Use a test account with small amounts in production. See Sandbox & Testing.