# Error codes

Triple-A APIs return standard HTTP status codes. Error responses are JSON with `code`, `message`, and `status` fields, so your code can branch on `code` and log `message`.

## Authentication errors

These errors come from the token request and from requests that send a bad token. For how to get and cache a token, see [Authentication](/docs/getting-started/authentication/).

| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | | The token request failed because the client credentials could not be read. | Check your Client ID and Client Secret. |
| 401 | | The access token is missing, invalid, or expired. | Request a new token. |
| 403 | `no_permission` | The access token is invalid for this action. For payouts, the payout was already confirmed or cancelled. | Request a new token, or check the payout status. |
| 429 | | The rate limit was exceeded, for example when a one-time token is reused. | Slow down and retry. |

## Payment errors

The table below lists the errors a payment request can return. Use it when you create a payment with [Make a payment request](/api/stablecoin-payments/payments/post-payment/).

| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | `existing_pending_transaction` | A pending transaction for this payment is already on the blockchain. | Wait for it to confirm before you retry. |
| 400 | `payer_is_blocked` | The payer is blocked. | Don't retry. Contact your Triple-A account manager. |
| 409 | `cannot_process` | The payment has unfulfilled requirements, such as KYC. | See [Choose your solution](/docs/getting-started/our-solutions/#how-the-solutions-connect). |
| 409 | `no_select` | The payer has not selected a digital currency. | Send the customer back to the payment form. |
| 422 | `validation_error` | The request has invalid parameters. | Check the parameters against the endpoint's reference page. |

## Related content

These pages cover related topics.

- [Webhooks](/docs/reference/webhooks/) for how Triple-A reports status changes
- [Payment statuses](/docs/reference/payment-statuses/) for what each status means