Errors
When a request fails, the API answers with an HTTP status and a body in the standard Problem Details format, served as application/problem+json.
| Field | Type | Required | What it is |
|---|---|---|---|
type |
string (uri) | yes | https://passkaar.com/developers/errors/{code}: the code’s documentation. |
title |
string | yes | The same for every occurrence of a code. |
status |
integer | yes | |
detail |
string | This occurrence, in words for a developer. Never parse it. | |
code |
invalid_request, unauthorized, shop_locked, not_found, ambiguous, card_in_wallet, external_id_taken, already_reversed, request_in_progress, hold_not_open, previous_secret_active, idempotency_key_reused, reference_reused, invalid_answers, program_closed, customer_limit_reached, card_not_active, operation_not_allowed, give_required, card_required, insufficient_balance, daily_cap_reached, bill_too_large, give_limit_reached, invalid_occurred_at, reversal_exceeds_award, opening_balance_not_allowed, webhook_url_not_allowed, rate_limited, internal_error, unavailable |
yes | |
request_id |
string | yes | The X-Request-Id this answer carried. |
errors |
array of object | With invalid_request and invalid_answers: each field refused. |
|
reason |
unpublished, not_accepting, ended, all_claimed |
With program_closed. |
Branch on code, never on title or detail: detail is written for a person and may change. New codes may be added within version 1; treat one you do not know by its HTTP status. Every answer carries an X-Request-Id header, also in the body as request_id: quote it when you write to support.
Retrying is safe with the same Idempotency-Key for rate_limited, request_in_progress, internal_error and unavailable. The others give the same answer until the request or the card changes.
Every code
Section titled “Every code”| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request |
The request is not valid |
| 401 | unauthorized |
Unauthorized |
| 403 | shop_locked |
The shop cannot sign customers up while it is locked |
| 404 | not_found |
Not found |
| 409 | ambiguous |
More than one card matches |
| 409 | card_in_wallet |
The card has already been in a wallet |
| 409 | external_id_taken |
That external id belongs to another customer |
| 409 | already_reversed |
The award has already been reversed in full |
| 409 | request_in_progress |
A request with this key is still running |
| 409 | hold_not_open |
The hold is no longer open |
| 409 | previous_secret_active |
The last roll’s previous secret is still signing |
| 422 | idempotency_key_reused |
The idempotency key was used with a different request |
| 422 | reference_reused |
The reference was used for a different card |
| 422 | invalid_answers |
The answers do not meet the card’s form |
| 422 | program_closed |
The card is not taking sign-ups |
| 422 | customer_limit_reached |
The shop’s plan has no room for a new customer |
| 422 | card_not_active |
The card is not active |
| 422 | operation_not_allowed |
The card’s type does not allow this |
| 422 | give_required |
Say what to give: this card does not earn from a bill |
| 422 | card_required |
Spending needs the card itself or a store account linked with it |
| 422 | insufficient_balance |
The card does not hold enough |
| 422 | daily_cap_reached |
The card’s daily limit is reached |
| 422 | bill_too_large |
The bill is over the connection’s largest bill |
| 422 | give_limit_reached |
More than this connection gives the card by count in a day |
| 422 | invalid_occurred_at |
occurred_at is in the future |
| 422 | reversal_exceeds_award |
More than is left of the award |
| 422 | opening_balance_not_allowed |
This connection may not give a starting balance |
| 422 | webhook_url_not_allowed |
The address cannot receive webhooks |
| 429 | rate_limited |
Too many requests |
| 500 | internal_error |
Something went wrong on our side |
| 503 | unavailable |
The integration API is not available |