Update checkout by order
Send the shipping options and final amounts for an Express Checkout order after the shopper picks a shipping address.
Only works while the checkout is open (see 409).
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": 21000
}
]
}
'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": 21000
}
]
}
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: 21000
}
]
})
};
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' => 21000
]
]
]),
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\": 21000\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\": 21000\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\": 21000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"order_amount_in_cents": 19000,
"currency_code": "USD",
"shipping_address": {
"name": "John Doe",
"phone": "5555045294",
"street": "123 W Lake St",
"street2": "Unit 104",
"city": "Minneapolis",
"state": "MN",
"postal_code": "55408",
"country_code": "US"
}
}[
{
"code": "bad_request",
"message": "bad request"
}
][
{
"code": "unauthorized",
"message": "authorization not accepted"
}
][
{
"code": "record_not_found",
"message": "not found"
}
][
{
"code": "invalid",
"message": "checkout is immutable and cannot be updated: checkout-expired"
}
][
{
"code": "invalid",
"message": "checkout already completed",
"debug_uuid": "7c5d7f0e-2b1a-4c47-9a4e-0d2f6f1b8e3a"
}
]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
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
The checkout was updated
The order amount in cents after the update. Reflects the shipping option only when exactly one is sent. With several, it stays at the cart amount until the shopper picks one
The 3 character currency code as defined by ISO 4217
The shipping amount in cents. Omitted when zero, or when several shipping options were sent and the shopper hasn't picked one yet
The tax amount in cents. Omitted when zero, or when several shipping options were sent and the shopper hasn't picked one yet
The shopper's shipping address for the checkout
Hide child attributes
Hide child attributes
The name on the address
The street and number of the address
The apt or unit
The city
The 2 character state code
The postal delivery code
The 2 character country code
The phone number at the delivery location
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": 21000
}
]
}
'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": 21000
}
]
}
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: 21000
}
]
})
};
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' => 21000
]
]
]),
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\": 21000\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\": 21000\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\": 21000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"order_amount_in_cents": 19000,
"currency_code": "USD",
"shipping_address": {
"name": "John Doe",
"phone": "5555045294",
"street": "123 W Lake St",
"street2": "Unit 104",
"city": "Minneapolis",
"state": "MN",
"postal_code": "55408",
"country_code": "US"
}
}[
{
"code": "bad_request",
"message": "bad request"
}
][
{
"code": "unauthorized",
"message": "authorization not accepted"
}
][
{
"code": "record_not_found",
"message": "not found"
}
][
{
"code": "invalid",
"message": "checkout is immutable and cannot be updated: checkout-expired"
}
][
{
"code": "invalid",
"message": "checkout already completed",
"debug_uuid": "7c5d7f0e-2b1a-4c47-9a4e-0d2f6f1b8e3a"
}
]