v1 (deprecated)
Setting Your Configuration
Configure webhook URL
POST
/
v1
/
configuration
Setting Your Configuration
curl --request POST \
--url https://sandbox.gateway.sezzle.com/v1/configuration \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"webhook_url": "https://yourdomain.com/webhook"
}
'import requests
url = "https://sandbox.gateway.sezzle.com/v1/configuration"
payload = { "webhook_url": "https://yourdomain.com/webhook" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhook_url: 'https://yourdomain.com/webhook'})
};
fetch('https://sandbox.gateway.sezzle.com/v1/configuration', 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/v1/configuration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'webhook_url' => 'https://yourdomain.com/webhook'
]),
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/v1/configuration"
payload := strings.NewReader("{\n \"webhook_url\": \"https://yourdomain.com/webhook\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.gateway.sezzle.com/v1/configuration")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"https://yourdomain.com/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.gateway.sezzle.com/v1/configuration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhook_url\": \"https://yourdomain.com/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"status": 400,
"id": "bad_request",
"message": "bad request"
}{
"status": 401,
"id": "unauthorized",
"message": "authorization not accepted"
}{
"status": 404,
"id": "record_not_found",
"message": "not found"
}{
"status": 422,
"id": "invalid",
"message": "Unprocessable entity"
}You are viewing Version 1 of the Sezzle API. Check out the current version!
Webhooks
Order Webhooks
- Sezzle handles most of the consumer checkout process on its pages, using webhooks to notify your system about:
- Checkout updates
- Completions
- Refunds
- Use the instructions in this page to subscribe to Webhooks
- When a webhook event occurs, Sezzle will send the below Webhook object to the URL provided in the configuration
Order Webhook Object
- Template
- Example
- Options
{
"time": string,
"uuid": string,
"type": string,
"event": string,
"object_uuid": string,
"refund_id": string,
"refund_amount": {
"amount_in_cents": number,
"currency": string
}
}
{
"time": "2017-10-19T00:33:10.548372055Z",
"uuid": "02c5a2a0-8394-4b45-80b3-52d40c494322",
"type": "order_update",
"event": "order_complete",
"object_uuid": "Ref123456789",
"refund_id": "szl-a0293Pn-3948-80b3-ao34JAia39zQ",
"refund_amount": {
"amount_in_cents": 500,
"currency": "USD"
}
}
string
The time (UTC) at which the Webhook was generated.
string
A unique identifier for the webhook.
string
The high-level category.Available options:
order_update (coming soon)string
The ID for the Checkout/Order.Available options:
order_complete, order_refundstring
The ID for the Checkout/Order. For order update webhooks, the
object_uuid returned is the reference ID provided during checkout creation by the merchantstring
Unique ID for a refund. Included if the webhook event is order_refund
Previous
Create a CheckoutInitiate a Sezzle session with shopper order details, redirect links, and capture settings
Next
⌘I
Setting Your Configuration
curl --request POST \
--url https://sandbox.gateway.sezzle.com/v1/configuration \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"webhook_url": "https://yourdomain.com/webhook"
}
'import requests
url = "https://sandbox.gateway.sezzle.com/v1/configuration"
payload = { "webhook_url": "https://yourdomain.com/webhook" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhook_url: 'https://yourdomain.com/webhook'})
};
fetch('https://sandbox.gateway.sezzle.com/v1/configuration', 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/v1/configuration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'webhook_url' => 'https://yourdomain.com/webhook'
]),
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/v1/configuration"
payload := strings.NewReader("{\n \"webhook_url\": \"https://yourdomain.com/webhook\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.gateway.sezzle.com/v1/configuration")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"https://yourdomain.com/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.gateway.sezzle.com/v1/configuration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhook_url\": \"https://yourdomain.com/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"status": 400,
"id": "bad_request",
"message": "bad request"
}{
"status": 401,
"id": "unauthorized",
"message": "authorization not accepted"
}{
"status": 404,
"id": "record_not_found",
"message": "not found"
}{
"status": 422,
"id": "invalid",
"message": "Unprocessable entity"
}