{"openapi":"3.1.0","info":{"title":"Configuration","version":"1.0.0"},"paths":{"/v2/configuration":{"get":{"operationId":"get-configuration","summary":"Get Configuration","description":"Use this endpoint to retrieve the merchant's applicable payment limits.\n\nA request to [Create Checkout](Checkouts.v2.yaml/paths/~1v2~1checkouts/post) may be rejected if the order amount is not between the `minimumAmount` and `maximumAmount` (inclusive).\n\nAfterpay merchant configuration does not change frequently. For this reason, the configuration response includes Cache-Control headers to minimise network round trips when using a modern HTTP client. You should call Get Configuration on a fixed schedule, preferably once per day.\n\n**Connection Timeouts**\n| Timeout | Time (Seconds) |\n|---------|----------------|\n| Open | 10 |\n| Read | 20 |\n\n**Example request**\n\n`GET /v2/configuration?include=publicid&include=consumerlending&include=paybyinstallment`","tags":[""],"parameters":[{"name":"include","in":"query","description":"Repeat this query parameter to include optional configuration fields in the response. The endpoint always returns `minimumAmount` and `maximumAmount`.\n\nSupported values:\n- `publicid`: include `publicId`, the merchant public identifier (MPID) when one exists.\n- `consumerlending`: include `consumerLending`, which indicates whether consumer lending is enabled and, when enabled, the eligible minimum and maximum order amounts.\n- `paybyinstallment`: include `payByInstallment`, the configured pay by installment minimum and maximum eligible order amounts.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"Authorization","in":"header","description":"Basic authentication","required":true,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":false,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Returns a [configuration](../reference/Configuration.v2.yaml/components/schemas/Merchant-limit) object containing the following attributes.\n| Attribute | Type | Description |\n|-----------|----------------| ----------- |\n| `minimumAmount` | Money | Minimum order amount. Note: This attribute may not be included if the Merchant account has no minimum order amount.\n| `maximumAmount` | Money | Maximum order amount.\n| `publicId` | string | Merchant public identifier (MPID). Returned when `include=publicid` is requested and a public mapping exists for the merchant.\n| `consumerLending` | object | Returned when `include=consumerlending` is requested. Contains `enabled` and, when enabled, `minimumAmount` and `maximumAmount` for consumer lending.\n| `payByInstallment` | object | Returned when `include=paybyinstallment` is requested and pay by installment is configured for the merchant. Contains `minimumAmount` and `maximumAmount`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Merchant-limit"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-configurationRequestUnauthorizedError"}}}}}}},"/v2/configuration/mappings":{"get":{"operationId":"get-configuration-mappings","summary":"Get Configuration Mappings","description":"To set-up Cash App Pay on file, use this endpoint to retrieve your Cash App Pay brand ID.","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Basic authentication","required":true,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Accept","required":false,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigurationMappings"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-configuration-mappingsRequestUnauthorizedError"}}}},"403":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Get-configuration-mappingsRequestForbiddenError"}}}}}}}},"servers":[{"url":"https://global-api-sandbox.afterpay.com","description":"Sandbox"},{"url":"https://global-api.afterpay.com","description":"Production"}],"components":{"schemas":{"MoneyCurrency":{"type":"string","enum":["AUD","NZD","USD","CAD","GBP"],"title":"MoneyCurrency"},"Money":{"type":"object","properties":{"amount":{"type":"string","description":"The amount as a string representation of a decimal number, rounded to 2 decimal places."},"currency":{"$ref":"#/components/schemas/MoneyCurrency"}},"required":["amount","currency"],"description":"Object containing amount and currency","title":"Money"},"MerchantLimitConsumerLending":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether consumer lending is enabled for this merchant."},"minimumAmount":{"$ref":"#/components/schemas/Money","description":"Minimum eligible order amount when consumer lending is enabled."},"maximumAmount":{"$ref":"#/components/schemas/Money","description":"Maximum eligible order amount when consumer lending is enabled."}},"description":"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.","title":"MerchantLimitConsumerLending"},"MerchantLimitPayByInstallment":{"type":"object","properties":{"minimumAmount":{"$ref":"#/components/schemas/Money","description":"Minimum eligible order amount for pay by installment."},"maximumAmount":{"$ref":"#/components/schemas/Money","description":"Maximum eligible order amount for pay by installment."}},"description":"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.","title":"MerchantLimitPayByInstallment"},"Merchant-limit":{"type":"object","properties":{"minimumAmount":{"$ref":"#/components/schemas/Money"},"maximumAmount":{"$ref":"#/components/schemas/Money"},"publicId":{"type":"string","description":"Merchant public identifier (MPID). Returned only when `include=publicid` is requested and a public mapping exists for the merchant."},"consumerLending":{"$ref":"#/components/schemas/MerchantLimitConsumerLending","description":"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."},"payByInstallment":{"$ref":"#/components/schemas/MerchantLimitPayByInstallment","description":"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."}},"title":"Merchant-limit"},"Get-configurationRequestUnauthorizedError":{"type":"object","properties":{"errorCode":{"type":"string"},"errorId":{"type":"string"},"message":{"type":"string"},"httpStatusCode":{"type":"integer"}},"title":"Get-configurationRequestUnauthorizedError"},"ConfigurationMappings":{"type":"object","properties":{"name":{"type":"string","description":"Name of the brand to be shown in Cash App next to payments."},"externalBrandId":{"type":"string","description":"The brand identifier for the Afterpay <> Cash App Pay merchant mapping."}},"required":["name","externalBrandId"],"title":"ConfigurationMappings"},"Get-configuration-mappingsRequestUnauthorizedError":{"type":"object","properties":{"errorCode":{"type":"string"},"errorId":{"type":"string"},"message":{"type":"string"},"httpStatusCode":{"type":"integer"}},"title":"Get-configuration-mappingsRequestUnauthorizedError"},"Get-configuration-mappingsRequestForbiddenError":{"type":"object","properties":{"errorCode":{"type":"string"},"errorId":{"type":"string"},"message":{"type":"string"},"httpStatusCode":{"type":"integer"}},"title":"Get-configuration-mappingsRequestForbiddenError"}},"securitySchemes":{"sec0":{"type":"http","scheme":"basic"}}}}