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
  • Technical Guides
      • Introduction
      • Request Signing
      • Errors
    • Onboarding
    • Capabilities
LogoLogo
On this page
  • Error Codes
  • Error Response Object
Technical GuidesWelcome

Errors

Was this page helpful?
Previous

Onboarding

Next
Built with

The Afterpay API follows a standard pattern for representing errors in API responses:

  • A non HTTP 2XX response code is returned (typically a 4XX or 5XX)
  • An error JSON object is returned with relevant error details

Error Codes

HTTP Status CodeDescription
400 - Bad RequestInvalid request or missing parameters.
401 - UnauthorizedInvalid authentication, including an incorrect API key.
402 - Payment RequiredThe checkout token is invalid, expired, or does not exist. Checkout tokens expire after 60 minutes.
404 - Not FoundThe requested onboarding does not exist.
409 - ConflictThe onboarding already exists.
412 - Precondition failedThe consumer payment was not successful.
422 - Unprocessable entityThe checkout token is missing or empty.
500-599 - Request not processedInternal server error or other response indicating request could not be processed. Please check our status page and/or escalate to our team.

Error Response Object

See the following schemas for each error code:

  • 400 - short error
  • 400 - expanded error
  • 401
  • 409
  • 404
  • 503