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.
Parameter | Type | Description |
---|---|---|
Sezzle-Request-Id | string | A unique, merchant-generated ID. |
Order Payment Object
Parameter | Required | Type | Description |
---|---|---|---|
intent | true | string | Accepted values are "AUTH" or "CAPTURE" |
reference_id | true | string | A reference ID for the order |
order_amount | true | object | The amount and currency of the order |
financing_options | true | array | The financing option of the order. Only one option can be included. |
Order Amount Object
Parameter | Required | Type | Description |
---|---|---|---|
amount_in_cents | true | number | The order amount in cents |
currency | true | string | The 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.