For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI Reference
HomeGuidesAPI Reference
  • Online API
    • API Environments
    • Direct Payment Flow
    • REST
    • HTTPS
    • Dates
    • Pagination
    • Authentication
    • Idempotent Requests
    • Timeouts
    • API Simulator
  • Models
    • Introduction
    • Contact Object
    • Consumer Object
    • Discount Object
    • Item Object
    • Money Object
    • Order Details Object
    • Payment Object
    • Refund Object
    • Shipping Courier Object
  • Service Status
    • GETPing
  • Configuration
    • GETGet Configuration
  • Orders
    • Introduction
    • GETGet Order
    • POSTCreate Order
  • Javascript afterpay.js
    • Information
    • Redirect Method
  • Payments
    • Introduction
    • POSTCapture Payment
    • PUTUpdate Shipping Courier
    • GETGet Payment By Order ID
    • GETGet Payment By Token
    • GETList Payment(s)
    • POSTCreate Refund
    • PUTUpdate Payment by Order ID
    • POSTReverse Payment By Token
  • Errors
    • Introduction
    • Get Errors
    • Put/Post Errors
  • Reference
LogoLogo
On this page
  • PUT/POST Errors
Errors

Put/Post Errors

Was this page helpful?
Previous

Capture Payment

Next
Built with

PUT/POST Errors

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

HTTP Status CodeerrorCodeDescription
400
Bad Request
invalid_jsonThe request body contains invalid or improperly formatted JSON.
401
Unauthorized
unauthorizedInvalid Merchant API credentials were passed in the Authorization header.
405
Method Not Allowed
method_not_allowedThe 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
errorThe request included an Accept header for something other than application/json or */*.
415
Unsupported Media Type
errorThe request did not include a Content-Type header, or its value was anything other than application/json.
500
Internal Server Error
errorA common cause of this response from PUT/POST endpoints is that the request body is missing or empty.