Errors

One envelope, stable machine-readable codes, honest messages.

{ "error": { "code": "insufficient_funds", "message": "The partner balance cannot cover this amount plus fees." } }

Codes

HTTPCodeMeaning
400validation_errorA field is missing or malformed — the message says which.
400idempotency_key_requiredMoney-moving POST without an Idempotency-Key header.
401invalid_api_keyUnknown, revoked, or malformed key.
402insufficient_fundsYour balance can't cover the amount plus fees. Fund and retry.
402provider_declinedThe card network declined the operation.
403partner_suspendedYour account is suspended — contact PrimCard.
403secure_details_disabledCard-detail access isn't enabled for your account.
403test_key_not_allowed / live_key_not_allowedEndpoint exists only in the other mode.
404card_not_foundNo such card on this account (ids from the other mode 404 too).
409external_ref_takenYou already created a card under this external_ref — GET it instead.
409invalid_stateThe card's current status doesn't allow this (e.g. topping up a frozen card).
409idempotency_in_flightOriginal request still processing — retry the same key shortly.
422limit_exceededA platform limit (per-transaction / velocity / card cap) blocks this.
422idempotency_conflictSame Idempotency-Key, different body.
429rate_limitedSlow down; honor Retry-After.
500internal_errorOur side. For money POSTs: retry with the same Idempotency-Key.

Rule of thumb: 4xx means fix the request (retrying unchanged won't help); 5xx or a network timeout means retry with the same Idempotency-Key.