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
Cardholderchd_chd_1024cardholder/create response / cardholder_id on the cardholder endpoints and /card/apply / cardholder.status_changed webhook (v1.6)
Cardholder filechf_chf_301cardholder/files/upload response / identity.*_file_id on cardholder create / update (v1.6)

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 ​

A well-formed ID is the prefix followed by a positive decimal integer (card_12345, hdr_5, pkg_67). Anything else — missing or wrong prefix, empty, non-numeric (card_abc), zero or negative — is malformed.

CaseHTTPcodeerror_key
card_id missing or malformed (e.g. 12345, card_abc)20040000openapi_invalid_card_id
card_id well-formed but the card does not exist or is not owned by your account40440400card_not_found
card_id points to one of your cards that is not an OpenAPI virtual card type (e.g. a physical card)20040000openapi_card_type_not_supported
header_id missing or malformed, or well-formed but unknown20040000openapi_invalid_header_id
package_id missing or malformed20040000openapi_invalid_package_id
cardholder_id missing or malformed20040000openapi_invalid_cardholder_id
cardholder_id well-formed but not a cardholder registered through OpenAPI on your account40440400cardholder_not_found
A *_file_id (cardholder file) malformed20040000openapi_invalid_cardholder_file_id (data.field names the field)
A *_file_id well-formed but not uploaded by your account40440400cardholder_file_not_found

card_not_found applies to /card/info, /card/freeze, /card/unfreeze, /card/close, /card/recharge, /card/transactions/list and /transactions/list (when its card_id filter is set). A card belonging to another account gets exactly the same card_not_found response as a card that never existed, so ownership cannot be probed.

A well-formed but unknown package_id is not reported through openapi_invalid_package_id: /card/first_deposit/preview answers is_valid=false with invalid_reason bank_card_config_not_found. Use the package_id values returned by /card_configs/list for the same header.

Malformed vs. not found

openapi_invalid_*_id (HTTP 200 / 40000) means the request itself is wrong — fix the ID you are sending; retrying the same value never succeeds. card_not_found (HTTP 404 / 40400) means the ID is syntactically fine but there is no such card under your account — check that you are using the right credential / account.

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 Brand 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: Brand'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.