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
  • Foundations
    • Introduction
    • Request Headers
    • User-Agent Header
    • Authentication
    • Errors
    • Data Requirements
  • Online API
      • Contact object
      • Consumer object
      • Discount object
      • Item object
      • Money object
      • Order Details object
      • Payment object
      • Payment Event object
      • Refund object
      • Shipping Courier object
      • Shipping Options object
    • Immediate Payment Flow
    • Deferred Payment Flow
  • Upgrading to the Clearpay Express Checkout
    • Express Checkout Overview
    • How to Integrate
    • Security
LogoLogo
On this page
  • Attributes
  • 422 Errors
  • Example Money object
Online APIData Models

Money object

Was this page helpful?
Previous

Order Details object

Next
Built with

Attributes

AttributeTypeDescription
amountstring requiredThe amount is a string representation of a decimal number, rounded to 2 decimal places.
currencystring requiredThe currency in ISO 4217 format. Only “GBP” is supported.

422 Errors

Where a Money object is included in an API request, it will be validated according to the specification above. Invalid Money objects will trigger a 422 Unprocessable Entity response. The following is a list of common examples.

ExampleerrorCodemessage
amount is omitted or nullinvalid_object{Money object}.amount Amount field required
amount has more than 2 decimal placesinvalid_objectamount. must be a valid ISO 4217 format value
amount includes a thousands separator comma, for example: “1,000”invalid_amountAmount must be a valid ISO 4217 format value
amount is not a decimal number, for example: “FREE”, “£2” or an empty stringinvalid_object{Money object}.amount Amount field must be a valid ISO 4217 format value
currency is omitted or nullinvalid_object{Money object}.currency Currency field required
currency is not a valid currency code, not all uppercase or an empty stringinvalid_object{Money object}.currency Currency not supported for this merchant
currency is supported by Clearpay, but not valid for the Merchant accountunsupported_currencyAn error occurred

Example Money object

1{
2 "amount": "29.99",
3 "currency": "GBP"
4}