Skip to content

IDs & Prefixes

All public resource IDs are prefixed strings rather than raw integer DB keys. When you send IDs back, keep the prefix as-is.

Prefix Table

ResourcePrefixExampleWhere it appears
Cardcard_card_12345apply response / card_id field on subsequent endpoints
Packagepkg_pkg_67card_configs/list response / apply request
Card headerhdr_hdr_5card_headers/list response / apply request
Recharge transactiontxn_txn_OO20260429110012abcrecharge response / webhook payload
Webhook eventevt_evt_550e8400-e29b-41d4-a716-446655440000webhook_events/list response

Webhooks use the same convention

All IDs in webhook payloads are also prefixed. The Webhook-Id header value with evt_ stripped is the original UUID.

transaction_id is opaque

Treat txn_<...> as an opaque string for storage, lookup and reconciliation. The internal structure after the txn_ prefix is server-generated and not stable across versions or providers — never parse, slice or pattern-match it. Internal order references are intentionally not exposed.

Validation Rules

ErrorReturns
Missing prefix (e.g. sending 5 instead of hdr_5)400 openapi_invalid_header_id
Resource doesn't exist / not owned by you400 openapi_invalid_*_id (same key as "missing prefix" — no leakage)

No distinction between "format error" and "not found"

openapi_invalid_*_id covers all of:

  • Missing prefix
  • Wrong prefix
  • ID not owned by current AppID's account
  • ID does not exist

The server deliberately returns the same key — preventing enumeration attackers from probing valid ID ranges via response differences.

Internal Fields That Are Never Exposed

The response shape documented for each endpoint is the complete contract. Internal database identifiers, provider-side order references, intermediate computation values, and internal labels are never returned via OpenAPI.

If you see anything outside the documented response shape, please report it to the Coinepay team.

Tips

  • Store IDs with their prefix; send them back as-is (don't strip the digit part)
  • Logs/alerts should include the full ID (card_12345) for debugging
  • Differentiate from your internal IDs: Coinepay's IDs are card_xxx; your internal IDs should use a different prefix (e.g. kart_xxx) to avoid confusion.

Released under MIT-equivalent terms.