Skip to main content

Error Reference

All error responses use a consistent JSON envelope:

{
  "success": false,
  "error": {
    "code": "CARD_DECLINED",
    "message": "The card was declined by the issuer.",
    "details": {}
  }
}

HTTP status codes

StatusMeaning
200Request succeeded
400Bad request — invalid parameters or business rule violation
401Unauthorized — missing or invalid API key
403Forbidden — valid credentials but insufficient permissions
404Resource not found
409Conflict — duplicate or state violation
422Unprocessable — well-formed request but semantic error
429Rate limited — slow down and retry
500Internal server error — contact support if persistent

Error codes

Authentication

CodeHTTPDescriptionResolution
INVALID_API_KEY401The API key is missing or malformedCheck the Authorization: Bearer <key> header
EXPIRED_API_KEY401The API key has been revoked or expiredGenerate a new key from the dashboard
INSUFFICIENT_PERMISSIONS403Key lacks the required scopeUse a key with the required permission scope

Transactions

CodeHTTPDescriptionResolution
CARD_DECLINED400Card declined by the issuerAsk the customer to use a different card
CARD_EXPIRED400The card expiration date has passedAsk the customer for a valid card
INVALID_CVV400CVV does not matchAsk the customer to re-enter the CVV
INSUFFICIENT_FUNDS400Not enough funds on the cardAsk the customer to use a different card
DO_NOT_HONOR400Generic issuer declineAsk the customer to contact their bank
TRANSACTION_NOT_FOUND404No transaction with the given IDVerify the transaction ID
TRANSACTION_ALREADY_VOIDED409Transaction was already voidedNo action needed
CAPTURE_AMOUNT_EXCEEDS_AUTH422Capture amount is greater than the authorized amountReduce capture to at most the authorized amount
TRANSACTION_NOT_CAPTURABLE422Transaction type cannot be capturedOnly authorized transactions can be captured

Subscriptions

CodeHTTPDescriptionResolution
SUBSCRIPTION_NOT_FOUND404No subscription with the given IDVerify the subscription ID
SUBSCRIPTION_ALREADY_CANCELLED409Cannot cancel an already-cancelled subscriptionNo action needed
SUBSCRIPTION_PAUSED422Cannot bill a paused subscriptionResume the subscription first
INVALID_BILLING_INTERVAL400The billing interval is not validUse daily, weekly, monthly, or yearly

Settlements

CodeHTTPDescriptionResolution
BATCH_NOT_FOUND404No batch with the given IDVerify the batch ID
BATCH_ALREADY_CLOSED409Batch has already been settledQuery the closed batch details instead
BATCH_STUCK500Batch settlement is stuckUse the force-close endpoint or contact support

Webhooks

CodeHTTPDescriptionResolution
WEBHOOK_NOT_FOUND404No webhook with the given IDVerify the webhook ID
INVALID_WEBHOOK_URL400The endpoint URL is not reachable or invalidEnsure the URL is HTTPS and publicly accessible
INVALID_EVENT_TYPE400Unknown event type requestedSee the webhooks guide for valid types

Rate limiting

Requests are rate-limited per API key:

TierLimit
Default100 requests/minute
Burst20 requests/second
Export endpoints10 requests/minute

When rate-limited you receive HTTP 429 with a Retry-After header indicating seconds to wait:

HTTP/1.1 429 Too Many Requests
Retry-After: 15
Content-Type: application/json

{
  "success": false,
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests. Retry after 15 seconds."
  }
}

Implement exponential backoff with jitter when you receive a 429.