> This page is for Afterpay Online Developer, version v1.
> For other versions, use one of these documentation indexes:
> - Main (default): https://developers.afterpay.com/afterpay-online-developer/main/llms.txt
> - v1: https://developers.afterpay.com/afterpay-online-developer/v-1/llms.txt
> - Chinese: https://developers.afterpay.com/afterpay-online-developer/chinese/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.afterpay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.afterpay.com/_mcp/server.

# Errors

The Afterpay API uses the conventional HTTP status codes to indicate success or failure of an API request.

| HTTP Status Codes | Description                                                        |
| ----------------- | ------------------------------------------------------------------ |
| 200-299           | The request was processed successfully.                            |
| 400-499           | The request was not valid (e.g. a required parameter was missing). |
| 500-599           | The request could not be processed for an unexpected reason.       |

## Response

Returns a JSON object and an appropriate HTTP status code.

Please note that the human-readable textual messages included within the error object are improved over time. For validation and mapping purposes, please use the error code or HTTP status code values.

### Attribute

| Attribute        | Type    | Description                                                                                                                           |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `errorCode`      | string  | The type of error returned. For example, `invalid_object`, `unsupported_currency`, or `invalid_token`.                                |
| `errorId`        | string  | A unique error ID.                                                                                                                    |
| `message`        | string  | A human-readable message which provides more details about the error. In most cases, these messages can be displayed to the end user. |
| `httpStatusCode` | integer | The HTTP status code.                                                                                                                 |

> **Info**
>
> If you intend to contact Afterpay about an unexpected API response, please make sure you record the raw headers & body from your request, along with the raw headers & body received in response.