Skip to content

Errors ​

AgentCard returns errors as JSON with an HTTP status code:

json
{
  "error": "Withdrawal exceeds remaining card balance",
  "code": "insufficient_card_balance"
}
FieldDescription
errorHuman-readable message. May change; do not parse it.
codeStable machine-readable code. Branch on this.
detailsOptional extra data, e.g. details.field for validation errors or details.pendingRequestId for a request already in progress.

General rules ​

  • 4xx: fix the request or follow the action below. Retrying unchanged will fail again.
  • 429: a limit was reached. Wait and retry later.
  • 5xx: temporary. Retry later with backoff. If you had already submitted a payment, do not pay again: poll GET /cards/requests/{pendingRequestId} instead.
  • Never start a new issuance or recharge to "retry" a payment. Continue the original pendingRequestId.

Authentication ​

StatuscodeWhat to do
401authorization_requiredSend Authorization: Bearer <agent-vc>.
401vc_expiredGet a new challenge and VC.
403vc_challenge_expired, vc_challenge_invalid, vc_challenge_missing, vc_challenge_agent_mismatchGet a new challenge from POST /auth/challenge and mint a new VC for it.
403vc_audience_mismatchMint the VC with the audience returned by POST /auth/challenge.
403vc_invalid, vc_wrong_type, vc_issuer_mismatch, vc_sub_missingSend an Agent VC, not a login JWT.
403agent_not_linkedLink the agent to a FluxA Wallet (fluxa-wallet link-wallet), then retry.

See Authentication.

Card type and eligibility ​

StatuscodeWhat to do
400card_type_selector_requiredSend exactly one of cardTypeId, binId, bin.
400card_type_selector_invalidThe selector is malformed (bin must be 6–10 digits).
400card_type_amount_out_of_rangeUse an amount within the product's limits.
404card_type_not_foundUse an ID from GET /card-types.
409card_type_ambiguousThe bin matches several products. Use cardTypeId.
409card_type_unavailableThe product is not open for applications. Choose another.
403vip_whitelist_requiredThe user must apply for this product in FluxA Wallet (details.applicationUrl when present), then retry. Do not pay.
503card_access_unavailableEligibility could not be checked. Retry later. This is not a rejection.
503card_types_unavailable, card_issuance_pausedNew cards are temporarily unavailable. Retry later.

Cardholder ​

StatuscodeWhat to do
404cardholder_not_foundCreate a cardholder profile.
409cardholder_required, cardholder_not_approvedCreate the profile or wait until kycStatus is approved.
409bank_holder_action_requiredThe cardholder details need attention. Check the profile and ask the user to correct them.
409kyc_in_progressVerification is in progress. Wait.
409name_lockedThe verified name cannot be changed.
409revision_conflictRe-read the profile and retry with the current revision.
400revision_invalidIf-Match must be a positive integer.
422profile_invalidFix the field named in details.field.
429rate_limitedWait a minute and retry.

Amounts and limits ​

StatuscodeWhat to do
400invalid_amountUse a valid USD amount in the range stated in the message. For withdrawals, the amount must be larger than the fee.
400card_balance_limit_exceededThe card balance would exceed its cap. Use a smaller amount.
400insufficient_card_balanceThe withdrawal is more than the card balance.
409card_limit_reachedThe account has the maximum number of cards.
429daily_card_limit_reachedNew cards are limited for today. Try tomorrow.
429daily_withdraw_limit_reachedWithdrawals are limited for today. Try tomorrow.
503card_limits_unavailableLimits could not be checked. Retry before paying.

Cards, requests and payments ​

StatuscodeWhat to do
400invalid_card_idUse a card_… ID.
404card_not_foundThe card does not exist in this account.
409card_not_activeThe card is not active. Check its status.
400recharge_not_supported, withdraw_not_supportedThis card does not support the operation.
409recharge_in_progressContinue the recharge in details.pendingRequestId.
409withdrawal_in_progressWait for the current withdrawal to finish.
404withdrawal_not_foundCheck the withdrawal ID.
400missing_pending_request_id, missing_payment_payloadSend both pendingRequestId and paymentPayloadB64.
400pending_request_type_mismatchUse /cards/complete for issuance and /recharge/complete for recharges.
400pending_request_card_mismatchThe recharge request belongs to a different card.
403pending_request_forbiddenThe request belongs to another account.
404pending_request_not_foundCheck the pendingRequestId.
409pending_request_invalid_statusThe request is no longer payable. Get the request to see where it is.
410pending_request_expiredThe payment window passed. Start a new request.
400invalid_transaction_typeUse a supported type filter.

Service errors ​

StatuscodeWhat to do
502 / 503 / 504card_provider_error, card_service_error, other codesTemporary. Retry later. If a payment was already submitted, poll the request instead of paying again. If it persists, contact FluxA support.

Released under the MIT License.