> 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.

---

# PUT/POST Errors

All PUT and POST endpoints can return any of the following errors:

| HTTP Status Code                    | errorCode            | Description                                                                                                                                                                                                               |
| ----------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **400**   Bad Request               | `invalid_json`       | The request body contains invalid or improperly formatted JSON.                                                                                                                                                           |
| **401**  Unauthorized               | `unauthorized`       | Invalid Merchant API credentials were passed in the `Authorization` header.                                                                                                                                               |
| **405**  Method Not Allowed         | `method_not_allowed` | The request was made using an unacceptable HTTP Method. Depending on the endpoint, only `PUT` or `POST` requests will be allowed. Use the `OPTIONS` HTTP Method to determine which methods are allowed for each endpoint. |
| **406**    Not Acceptable           | `error`              | The request included an `Accept` header for something other than `application/json` or `*/*`.                                                                                                                             |
| **415**  Unsupported Media Type     | `error`              | The request did not include a `Content-Type` header, or its value was anything other than `application/json`.                                                                                                             |
| **500**       Internal Server Error | `error`              | A common cause of this response from `PUT`/`POST` endpoints is that the request body is missing or empty.                                                                                                                 |