Skip to main content
Learn about error handling when using the API.

Error Handling

The API uses standard HTTP status codes. Example error response:

Transaction Failure Codes

When a transaction cannot be completed, the API returns a machine-readable failure code along with a human-readable message. Use these codes to determine the appropriate action for your application.

Response Format

Failure Codes

Best Practices

Always use the failure_code field for programmatic handling. The failure_message is intended for debugging and may change over time.
When retrying failed requests, always include the same Idempotency-Key to prevent duplicate transactions.

Next Steps

Going live

Things to set to move from your sandbox account to live payments.