Skip to navigation

Get Configuration

This endpoint is used to retrieve the merchant’s applicable payment limits.

A request to Create Checkout may be rejected if the order amount is not between the minimumAmount and maximumAmount (inclusive).

Afterpay merchant configuration does not change frequently. For this reason, the configuration response will include Cache-Control headers in order to minimise network round trips when using a modern HTTP client. Get configuration should be called on a fixed schedule, preferably once per day.

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read20

Example request

GET /v2/configuration?include=publicid&include=consumerlending&include=paybyinstallment

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Query parameters

includelist of stringsOptional

Repeat this query parameter to include optional configuration fields in the response. The endpoint always returns minimumAmount and maximumAmount.

Supported values:

  • publicid: include publicId, the merchant public identifier (MPID) when one exists.
  • consumerlending: include consumerLending, which indicates whether consumer lending is enabled and, when enabled, the eligible minimum and maximum order amounts.
  • paybyinstallment: include payByInstallment, the configured pay by installment minimum and maximum eligible order amounts.

Response

Returns a configuration object containing the following attributes.

AttributeTypeDescription
minimumAmountMoneyMinimum order amount. Note: This attribute may not be included if the Merchant account has no minimum order amount.
maximumAmountMoneyMaximum order amount.
publicIdstringMerchant public identifier (MPID). Returned when include=publicid is requested and a public mapping exists for the merchant.
consumerLendingobjectReturned when include=consumerlending is requested. Contains enabled and, when enabled, minimumAmount and maximumAmount for consumer lending.
payByInstallmentobjectReturned when include=paybyinstallment is requested and pay by installment is configured for the merchant. Contains minimumAmount and maximumAmount.
minimumAmountobjectOptional

Object containing amount and currency.

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_object amountmust 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 Afterpay, but not valid for the Merchant accountunsupported_currencyAn error occurred
maximumAmountobjectOptional

Object containing amount and currency.

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_object amountmust 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 Afterpay, but not valid for the Merchant accountunsupported_currencyAn error occurred
publicIdstringOptional

Merchant public identifier (MPID). Returned only when include=publicid is requested and a public mapping exists for the merchant.

consumerLendingobjectOptional

Returned only when include=consumerlending is requested. Indicates whether consumer lending is enabled for the merchant's online channel and, when enabled, the eligible order amount range.

payByInstallmentobjectOptional

Returned only when include=paybyinstallment is requested and pay by installment is configured for the merchant. Contains the eligible order amount range for pay by installment.

Errors

401
Unauthorized Error