Orders
Update checkout by order
Complete an Express Checkout order
PATCH
/
v2
/
order
/
{order_uuid}
/
checkout
Complete checkout by order
curl --request PATCH \
--url https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"currency_code": "USD",
"address_uuid": "some-uuid-1234",
"shipping_options": [
{
"name": "Standard Shipping",
"description": "3-5 business days",
"shipping_amount_in_cents": 500,
"tax_amount_in_cents": 500,
"final_order_amount_in_cents": 20000
},
{
"name": "Express Shipping",
"description": "1-2 business days",
"shipping_amount_in_cents": 1000,
"tax_amount_in_cents": 1000,
"final_order_amount_in_cents": 20000
}
]
}
'import requests
url = "https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout"
payload = {
"currency_code": "USD",
"address_uuid": "some-uuid-1234",
"shipping_options": [
{
"name": "Standard Shipping",
"description": "3-5 business days",
"shipping_amount_in_cents": 500,
"tax_amount_in_cents": 500,
"final_order_amount_in_cents": 20000
},
{
"name": "Express Shipping",
"description": "1-2 business days",
"shipping_amount_in_cents": 1000,
"tax_amount_in_cents": 1000,
"final_order_amount_in_cents": 20000
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency_code: 'USD',
address_uuid: 'some-uuid-1234',
shipping_options: [
{
name: 'Standard Shipping',
description: '3-5 business days',
shipping_amount_in_cents: 500,
tax_amount_in_cents: 500,
final_order_amount_in_cents: 20000
},
{
name: 'Express Shipping',
description: '1-2 business days',
shipping_amount_in_cents: 1000,
tax_amount_in_cents: 1000,
final_order_amount_in_cents: 20000
}
]
})
};
fetch('https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'currency_code' => 'USD',
'address_uuid' => 'some-uuid-1234',
'shipping_options' => [
[
'name' => 'Standard Shipping',
'description' => '3-5 business days',
'shipping_amount_in_cents' => 500,
'tax_amount_in_cents' => 500,
'final_order_amount_in_cents' => 20000
],
[
'name' => 'Express Shipping',
'description' => '1-2 business days',
'shipping_amount_in_cents' => 1000,
'tax_amount_in_cents' => 1000,
'final_order_amount_in_cents' => 20000
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout"
payload := strings.NewReader("{\n \"currency_code\": \"USD\",\n \"address_uuid\": \"some-uuid-1234\",\n \"shipping_options\": [\n {\n \"name\": \"Standard Shipping\",\n \"description\": \"3-5 business days\",\n \"shipping_amount_in_cents\": 500,\n \"tax_amount_in_cents\": 500,\n \"final_order_amount_in_cents\": 20000\n },\n {\n \"name\": \"Express Shipping\",\n \"description\": \"1-2 business days\",\n \"shipping_amount_in_cents\": 1000,\n \"tax_amount_in_cents\": 1000,\n \"final_order_amount_in_cents\": 20000\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency_code\": \"USD\",\n \"address_uuid\": \"some-uuid-1234\",\n \"shipping_options\": [\n {\n \"name\": \"Standard Shipping\",\n \"description\": \"3-5 business days\",\n \"shipping_amount_in_cents\": 500,\n \"tax_amount_in_cents\": 500,\n \"final_order_amount_in_cents\": 20000\n },\n {\n \"name\": \"Express Shipping\",\n \"description\": \"1-2 business days\",\n \"shipping_amount_in_cents\": 1000,\n \"tax_amount_in_cents\": 1000,\n \"final_order_amount_in_cents\": 20000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency_code\": \"USD\",\n \"address_uuid\": \"some-uuid-1234\",\n \"shipping_options\": [\n {\n \"name\": \"Standard Shipping\",\n \"description\": \"3-5 business days\",\n \"shipping_amount_in_cents\": 500,\n \"tax_amount_in_cents\": 500,\n \"final_order_amount_in_cents\": 20000\n },\n {\n \"name\": \"Express Shipping\",\n \"description\": \"1-2 business days\",\n \"shipping_amount_in_cents\": 1000,\n \"tax_amount_in_cents\": 1000,\n \"final_order_amount_in_cents\": 20000\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"code": "bad_request",
"message": "bad request"
}
][
{
"code": "unauthorized",
"message": "authorization not accepted"
}
][
{
"code": "record_not_found",
"message": "not found"
}
][
{
"code": "invalid",
"message": "Unprocessable entity"
}
]This endpoint should be used with our express checkout offering. It is not intended for the direct integration flow.
Authorizations
The authentication token generated from providing API Keys to Sezzle Gateway
Path Parameters
The Order UUID to update (order.uuid from session response)
Body
application/json
The 3 character currency code as defined by ISO 4217
The UUID associated with the customer's shipping address
The shipping options for the order
Hide child attributes
Hide child attributes
The name of the shipping option
The description of the shipping option
The shipping amount in cents for the order
The tax amount in cents for the order
The final total amount in cents for the order including the shipping, tax and cart amount. etc
Response
Status No Content
Previous
Delete checkout by orderDelete an active (incomplete) checkout for an order. An example use-case is when a customer has been redirected to Sezzle but the order is cancelled in the ecommerce platform, call this endpoint to prevent the customer from completing the Sezzle checkout.
Next
⌘I
Complete checkout by order
curl --request PATCH \
--url https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"currency_code": "USD",
"address_uuid": "some-uuid-1234",
"shipping_options": [
{
"name": "Standard Shipping",
"description": "3-5 business days",
"shipping_amount_in_cents": 500,
"tax_amount_in_cents": 500,
"final_order_amount_in_cents": 20000
},
{
"name": "Express Shipping",
"description": "1-2 business days",
"shipping_amount_in_cents": 1000,
"tax_amount_in_cents": 1000,
"final_order_amount_in_cents": 20000
}
]
}
'import requests
url = "https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout"
payload = {
"currency_code": "USD",
"address_uuid": "some-uuid-1234",
"shipping_options": [
{
"name": "Standard Shipping",
"description": "3-5 business days",
"shipping_amount_in_cents": 500,
"tax_amount_in_cents": 500,
"final_order_amount_in_cents": 20000
},
{
"name": "Express Shipping",
"description": "1-2 business days",
"shipping_amount_in_cents": 1000,
"tax_amount_in_cents": 1000,
"final_order_amount_in_cents": 20000
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency_code: 'USD',
address_uuid: 'some-uuid-1234',
shipping_options: [
{
name: 'Standard Shipping',
description: '3-5 business days',
shipping_amount_in_cents: 500,
tax_amount_in_cents: 500,
final_order_amount_in_cents: 20000
},
{
name: 'Express Shipping',
description: '1-2 business days',
shipping_amount_in_cents: 1000,
tax_amount_in_cents: 1000,
final_order_amount_in_cents: 20000
}
]
})
};
fetch('https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'currency_code' => 'USD',
'address_uuid' => 'some-uuid-1234',
'shipping_options' => [
[
'name' => 'Standard Shipping',
'description' => '3-5 business days',
'shipping_amount_in_cents' => 500,
'tax_amount_in_cents' => 500,
'final_order_amount_in_cents' => 20000
],
[
'name' => 'Express Shipping',
'description' => '1-2 business days',
'shipping_amount_in_cents' => 1000,
'tax_amount_in_cents' => 1000,
'final_order_amount_in_cents' => 20000
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout"
payload := strings.NewReader("{\n \"currency_code\": \"USD\",\n \"address_uuid\": \"some-uuid-1234\",\n \"shipping_options\": [\n {\n \"name\": \"Standard Shipping\",\n \"description\": \"3-5 business days\",\n \"shipping_amount_in_cents\": 500,\n \"tax_amount_in_cents\": 500,\n \"final_order_amount_in_cents\": 20000\n },\n {\n \"name\": \"Express Shipping\",\n \"description\": \"1-2 business days\",\n \"shipping_amount_in_cents\": 1000,\n \"tax_amount_in_cents\": 1000,\n \"final_order_amount_in_cents\": 20000\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency_code\": \"USD\",\n \"address_uuid\": \"some-uuid-1234\",\n \"shipping_options\": [\n {\n \"name\": \"Standard Shipping\",\n \"description\": \"3-5 business days\",\n \"shipping_amount_in_cents\": 500,\n \"tax_amount_in_cents\": 500,\n \"final_order_amount_in_cents\": 20000\n },\n {\n \"name\": \"Express Shipping\",\n \"description\": \"1-2 business days\",\n \"shipping_amount_in_cents\": 1000,\n \"tax_amount_in_cents\": 1000,\n \"final_order_amount_in_cents\": 20000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency_code\": \"USD\",\n \"address_uuid\": \"some-uuid-1234\",\n \"shipping_options\": [\n {\n \"name\": \"Standard Shipping\",\n \"description\": \"3-5 business days\",\n \"shipping_amount_in_cents\": 500,\n \"tax_amount_in_cents\": 500,\n \"final_order_amount_in_cents\": 20000\n },\n {\n \"name\": \"Express Shipping\",\n \"description\": \"1-2 business days\",\n \"shipping_amount_in_cents\": 1000,\n \"tax_amount_in_cents\": 1000,\n \"final_order_amount_in_cents\": 20000\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"code": "bad_request",
"message": "bad request"
}
][
{
"code": "unauthorized",
"message": "authorization not accepted"
}
][
{
"code": "record_not_found",
"message": "not found"
}
][
{
"code": "invalid",
"message": "Unprocessable entity"
}
]