Error Response Format
When a charge or refund fails, the response includes anerror object:
Payment Error Codes
Card Errors
Authentication Errors
Processing Errors
Validation Errors
Transaction Errors
Configuration Errors
Catch-All
HTTP Error Codes
In addition to payment-specific errors, the API returns standard HTTP error codes:400 Bad Request
Returned when the request is malformed or contains invalid data.- Missing required fields (
amount,currency,card) - Invalid field values (negative amount, expired card date)
- Invalid state transition (refunding a non-completed payment)
- Checkout session expired or already completed
- S2S charging not enabled for your business
- Payment older than 180-day refund window
- Too many payment attempts on a checkout session (rate limited to 5 per 15 minutes)
401 Unauthorized
Returned when authentication fails.- Invalid or missing
x-api-keyheader - Expired JWT token
- Invalid API key / secret combination
- Business profile deactivated
404 Not Found
Returned when the requested resource does not exist.- Invalid payment ID
- Payment belongs to a different business
- Checkout session does not exist
409 Conflict
Returned when the operation conflicts with existing state.- Attempting to create a duplicate business profile
Dispute-Related Errors
Disputes are not errors per se, but they have financial consequences:
Dispute fees are non-refundable regardless of outcome. The best defense against disputes is:
- Use 3DS authentication (shifts fraud liability to issuer)
- Provide clear billing descriptors
- Respond to disputes promptly with evidence
- Maintain records of customer transactions and communication
Debugging Tips
- Look at
isRetryable: Only retry when this istrue. Retrying non-retryable errors wastes quota and may trigger rate limits. - Use test cards: Test card numbers trigger specific error scenarios. See the API Reference for the full list.
- Review webhook delivery logs: Failed webhook deliveries are logged and visible in the Axra dashboard.
- Contact support: For
unknownerrors or persistentconfiguration_error, contact Axra support with thepaymentIdandtransactionId.
