You are viewing Version 1 of the Sezzle API. Check out the current version!

  • Sezzle API v1 is designed for merchants wanting to accept Sezzle as a payment option.
  • The Sezzle Integration Flow outlines the user payment interaction process.
  • Sezzle supports individually authorized transactions for single purchases of goods or services.
  • An approved Sezzle account is required to begin integration; visit the signup page to create one if needed.

Testing

While you are working on the integration, you should test it in a sandbox environment before going live.

Sandbox

API Endpoint https://sandbox.gateway.sezzle.com/v1
Sandbox Dashboard https://sandbox.dashboard.sezzle.com/merchant

Credentials to log in to the sandbox dashboard are the same ones you use to log in to the Sezzle Merchant Dashboard. You can create your test API keys in the sandbox dashboard.

Test Data

You can use the following test data to test your integration:

BankUsernamePassword
Test Bankdemogo
Card NumberCVV/CVCExpiration DataNameAddress
4242424242424242any (3 numbers)anyanyany

Phone and other information

  • Please use any valid phone number
  • The expected OTP is 123123
  • Personal information does not need to be real

Open API Specification

  • The OpenAPI Specification (OAS) offers a standard, language-independent interface for RESTful APIs, allowing humans and machines to understand service capabilities without source code, documentation, or network traffic analysis.
  • Access the Sezzle v2 OpenAPI Specification for integration details.
  • Import the Sezzle v2 OpenAPI Specification into the Swagger Editor to generate a Sezzle client in multiple programming languages.
  • For languages unsupported by Swagger, use OpenAPI Generator as an alternative tool.

Integration Flow

Payment Flow Explanation

  1. Merchant calls /v1/checkouts to send cart data to Sezzle
  2. Sezzle returns URL to redirect consumer to make payment at Sezzle checkout
  3. Merchant redirects the consumer to Sezzle
  4. When the consumer completes the Sezzle checkout flow, they are redirected back to merchant’s website
  5. Alternatively, on approval, the consumer is redirected from Sezzle checkout to merchant’s website and merchant captures the order by calling /v1/complete

Refund Request

ParameterTypeDescription
amount*objectA price object that defines the amount to be refunded. Amount may not be 0, negative, or exceed the total order amount. Currency must either be the order’s currency or the customer’s paying currency. This field is optional if the is_full_refund parameter is true.
refund_idstringUUID for the Refund. Must be unique to a Merchant.
refund_reasonstringA reason for the refund.
is_full_refundbooleanOverrides amount. If true, the order will be fully refunded. If omitted, will default to false

Javascript SDK

The Javascript SDK is documented in the latest API v2 documentation. It is supported for users of the v1 API using the same loadable page script.

When using the Javascript SDK with v1, use apiVersion: “v1” in the Checkout constructor.

Create a Checkout

checkout.startCheckout({
    checkout_payload: {
        "amount_in_cents": 12999,
        "currency_code": "USD",
        "order_reference_id": "Ref123456789",
        "order_description": "Order #1800",
    }
});
  • Using the Javascript SDK with v1:
    • Create a checkout with the Checkout Object.
    • Complete the checkout using the Complete a Checkout endpoint.
  • The v1 endpoint:
    • Captures the total order amount.
    • Does not require a request body.
  • Do not use the payload object shown in the example capture for v1.

Complete a Checkout

checkout.capturePayment("Ref123456789");

Widget SDK

  • The Widget SDK loads Sezzle sales widgets onto web pages.
  • Widgets require a config to be provided before the script loads, or they will not display.
  • The project repository is available at https://github.com/sezzle/sezzle-js.
  • Refer to the latest documentation for widget configuration details.