Skip to main content

Create order by customer

You can use this endpoint to create an order for a customer

caution

It is extremely important to note this API will return a 200 success if the request to create an order is successful (i.e. no errors) but the customer could not be approved for the order.

Endpoint

POST https://gateway.sezzle.com/v2/customer/{customer_uuid}/order

Properties

Header Parameters

Use this header to enforce idempotency when authorizing order payment.

ParameterTypeDescription
Sezzle-Request-IdstringA unique, merchant-generated ID.

Order Payment Object

ParameterRequiredTypeDescription
intenttruestringAccepted values are "AUTH" or "CAPTURE"
reference_idtruestringA reference ID for the order
order_amounttrueobjectThe amount and currency of the order
financing_optionstruearrayThe financing option of the order. Only one option can be included.

Order Amount Object

ParameterRequiredTypeDescription
amount_in_centstruenumberThe order amount in cents
currencytruestringThe 3 character currency code as defined by ISO 4217

Example Request

{
"intent": "AUTH",
"reference_id": "annual_sub_123",
"order_amount": {
"amount_in_cents": 5000,
"currency": "USD"
}
}

Example Response

{
"uuid": "6c9db5d4-d09a-4224-860a-b5438ac32ca8",
"links": [
{
"href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8",
"method": "GET",
"rel": "self"
},
{
"href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8",
"method": "PATCH",
"rel": "self"
},
{
"href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8/release",
"method": "POST",
"rel": "release"
},
{
"href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8/capture",
"method": "POST",
"rel": "capture"
},
{
"href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8/refund",
"method": "POST",
"rel": "refund"
}
],
"intent": "AUTH",
"reference_id": "annual_sub_123",
"order_amount": {
"amount_in_cents": 5000,
"currency": "USD"
},
"authorization": {
"authorization_amount": {
"amount_in_cents": 5000,
"currency": "USD"
},
"approved": true,
"expiration": "2020-04-23T16:13:44Z"
}
}
danger

Please be sure to check the authorization.approved boolean value for true to determine if the order was created.