PaymonetraDocs

Card errors

The HTTP status is the answer. type is what you branch on, and field names the input when one is at fault.

Errors look like this, with field when one input is at fault:

The shape
{
  "error": {
    "type": "insufficient_card_balance",
    "message": "Your NGN card balance is too low for that. NGN 3,500.00 is available to spend."
  }
}

#Every type

HTTPtype
401unauthorized
403card_api_not_enabled, card_programme_suspended, ip_not_allowed, account_inactive, not_verified, test_mode_only
404cardholder_not_found, card_not_found, not_found
409cardholder_exists, reference_in_use, card_limit_reached, brand_unavailable, currency_unavailable (a card currency we've paused on live), bad_state, fee_unpaid, not_yet, card_busy
422invalid_request (with field), insufficient_card_balance, identity_mismatch, identity_not_found, cardholder_refused, dollar_needs_bvn, below_minimum, over_maximum, daily_limit
202pending_confirmation
429rate limited; slow down and retry
502provider_error (nothing was taken)
503identity_check_unavailable, temporarily_unavailable

#Three that look like bugs and are not

  • 403 card_api_not_enabled is a switch on our side, not a problem with your key. Ask for access, and once we approve it, it answers in test and live.
  • 202 pending_confirmation on POST /cards means the card was asked for. Wait for card.created, and do not retry with a new reference.
  • 502 provider_error means nothing was taken. Your balance is untouched and no card exists.

The rest of the API has its own table: errors.