The Readme API Simulator includes form elements for both required and optional Body Params. If not populated with values, Readme will send empty strings to the Afterpay Online API. Any optional parameter that is validated against a Model will need to have all of its required sub-params populated with non-empty values.
Therefore, to avoid receiving unexpected "400" responses from Afterpay, please fill out all fields of the simulation form with valid values. This is particularly important for the
currencysub-params of the
popupOriginUrlis optional if using the
redirectConfirmURLand is found under the
merchantobject. However, this method is used by most new merchants. You can see how the method is used for Express Checkout and read more about the Popup method under our standard checkout page.
Returns a token, expiry date/time and checkout URL if successful.
In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Create Checkout:
|HTTP Status Code||errorCode||Description|
|One or more required fields were missing or invalid.|
|Money is not supported by the merchant.|