Errors
The API uses conventional HTTP status codes; failures return a JSON body describing what went wrong.
| Code | Meaning | Usual cause |
|---|---|---|
| 200 / 201 | OK / Created | The request succeeded. |
| 400 | Bad Request | A required field is missing, or a value is out of range — for example an unsupported currency. |
| 401 | Unauthorized | Missing, malformed or revoked API key. |
| 403 | Forbidden | The key is valid but has no permission on that app — often a sandbox key used against a live app. |
| 404 | Not Found | Unknown appId, paymentId, referenceId or customerId. |
| 409 | Conflict | The operation does not fit the current state — capturing an already-captured payment, or creating a payment with a referenceId your app has already used. |
| 500 | Server Error | Something failed on our side. Retry with backoff; if it persists, contact support with the paymentId. |
Payment failures are not HTTP failures
A declined card is a successful API call: you get 200, and the payment's paymentState is Failed with the reason in lastError. Always branch on the state, not on the status code alone.