# Get a bearer authentication token Source: https://docs.sezzle.com/docs/api/core/authentication/postauthentication post /v2/authentication Generate authentication token from your Sezzle merchant API keys for use in the header of all other API requests. # Get interest account activity Source: https://docs.sezzle.com/docs/api/core/interest/getv2activity get /v2/interest/activity If you are enrolled in the interest account program, get the current activity on the interest account. # Get interest account balance Source: https://docs.sezzle.com/docs/api/core/interest/getv2balance get /v2/interest/balance If you are enrolled in the interest account program, get the current balance on the interest account. Fractions of cents are tracked to properly calculate daily interest accrual even if the interest balance is low. # Delete checkout by order Source: https://docs.sezzle.com/docs/api/core/orders/deletev2deletecheckoutbyorder delete /v2/order/{order_uuid}/checkout Delete 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. # Get order details Source: https://docs.sezzle.com/docs/api/core/orders/getv2order get /v2/order/{order_uuid} Get details and check the status of an existing order.\ Can be performed any time after session creation # Payment Flow Source: https://docs.sezzle.com/docs/api/core/orders/index ![Group2 Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/Group2.png) 1. Merchant calls `/v2/session` with order and intent of `AUTH` or `CAPTURE`. Optionally, the merchant can send customer information 2. Sezzle returns order uuid and checkout URL. 3. Merchant redirects customer to Sezzle checkout URL. 4. Customer completes the Sezzle checkout and is redirected to the session complete URL. * If the intent was to `CAPTURE`, Sezzle will capture the total order amount. * If the intent was to `AUTH`, Sezzle will only authorize the total order amount and the merchant can call `/v2/order` later to release or capture amounts using the order uuid. ## Supported Methods # Update order Source: https://docs.sezzle.com/docs/api/core/orders/patchv2checkout patch /v2/order/{order_uuid} Once transaction is completed, update Sezzle order with merchant reference ID # Update checkout by order Source: https://docs.sezzle.com/docs/api/core/orders/patchv2updatecheckoutbyorder patch /v2/order/{order_uuid}/checkout Complete an Express Checkout order This endpoint should be used with our express checkout offering. It is not intended for the direct integration flow. # Capture amount by order Source: https://docs.sezzle.com/docs/api/core/orders/postv2capturebyorder post /v2/order/{order_uuid}/capture Capture an amount by order, either in full or partial capture, in cases when the order items are shipped separately.\ Can be performed after shopper has authorized the transaction by completing checkout with Sezzle, but before authorization expires # Reauthorize amount by order Source: https://docs.sezzle.com/docs/api/core/orders/postv2reauthorizebyorder post /v2/order/{order_uuid}/reauthorize Reauthorize an amount by order whose initial authorization has expired before payment could be captured. Any attempts to reauthorize before the authorization expires will fail.\ Can be performed after shopper has authorized the transaction by completing checkout with Sezzle Please note the following when reauthorizing an order. * A new order will be created * The intent will be set to AUTH * The reference\_id will be the same as the original order * The reauthorized amount will be a new installment plan for the customer Reauthorizations are not guaranteed to be approved. It is extremely important to note this API will return a 200 success if the request to reauthorize is successful (i.e. no errors) but the customer was not approved. Please be sure to check the authorization **approved** value in the response to determine if the reauthorization order was created. # Refund amount by order Source: https://docs.sezzle.com/docs/api/core/orders/postv2refundbyorder post /v2/order/{order_uuid}/refund Refund an amount by order. An example use-case is when an order was captured but the customer returned item(s) that requires them to be refunded.\ Can be performed after order capture. # Release amount by order Source: https://docs.sezzle.com/docs/api/core/orders/postv2releasebyorder post /v2/order/{order_uuid}/release Release an amount by order. An example use-case is when an order is unable to be fully fulfilled and part of the authorization needs to be released. Then a capture can be called for the remaining amount.\ Can be performed after shopper has authorized the transaction by completing checkout with Sezzle but before the payment is fully captured. # Get session status Source: https://docs.sezzle.com/docs/api/core/sessions/getv2session get /v2/session/{session_uuid} Get session details # Create a session Source: https://docs.sezzle.com/docs/api/core/sessions/postv2session post /v2/session Initiate a Sezzle session with shopper order details, redirect links, and capture and tokenization settings # Get card data by token Source: https://docs.sezzle.com/docs/api/core/sessions/virtual/carddatabytoken get /v2/session/card/token/{token} You can use this endpoint to request card data with the checkout card token. The card token is temporary and only available for a limited time. This endpoint is only needed when a card session is created with a card response format of token. **Security Rules** Data is only available for 24 hours and requires an authorization token. Once accessed the token is deleted which cannot be undone. # Create a card session Source: https://docs.sezzle.com/docs/api/core/sessions/virtual/postv2sessioncard post /v2/session/card Creates a Sezzle virtual card session. A card session represents the issuance of a Sezzle virtual card to a Sezzle user and/or the agreement of a Sezzle user to use the virtual card as payment. Use the card session endpoints to create and update a card session. This endpoint should be used with our virtual card offering. It is not intended for the direct integration flow. # Update a card session Source: https://docs.sezzle.com/docs/api/core/sessions/virtual/setorderid patch /v2/session/{session_id}/card After the virtual card transaction for this session is successfully completed and a Sezzle order is created, call this endpoint to assign your order ID to the (external) reference ID of the Sezzle order. # Get summary Source: https://docs.sezzle.com/docs/api/core/settlements/getv2summary get /v2/settlements/summaries Get a summarized list of settlement payouts. If your store accepts multiple currencies, you will need to request settlement summaries for each supported currency. If currency code is not provided in the request, the default currency will be USD. # Get details Source: https://docs.sezzle.com/docs/api/core/settlements/getv2summarydetail get /v2/settlements/details/{payout_uuid} Get details on a specific settlement payout. ## Payout Summary (rows 1-2) ### Summary Headers (row 1) | Column Header | Description | | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | Total order amount | The sum of all orders on this payout. | | Total refund amount | The sum of all refunds on this payout. | | Total fee amount | The sum of all fees on this payout. | | Total returned fee amount | The sum of all returned fees on this payout. | | Total chargeback amount | The sum of all chargebacks on this payout. | | Total chargeback reversal amount | The sum of all chargeback reversals on this payout. | | Total interest transfer amount | The sum of all interest transfers on this payout. If you are not participating in the interest program, this field will be omitted. | | Total correction amount | The sum of all corrections on this payout. | | Total referral revenue transfer amount | The sum of all referral revenue transfers on this payout. | | Total bank account withdrawal amount | The sum of all bank account withdrawals. | | Total bank account withdrawal reversal amount | The sum of all bank account withdrawal reversals, which reflect a bank account withdrawal that has failed. | | Forex fees | The cost of foreign exchange fees associated with this payout. | | Net settlement amount | Net amount of settlement. | | Payment uuid | The UUID for this payout. | | Settlement currency | The currency in which this payout was sent. | | Payout date | The date this payout was sent. | | Payout status | The current status of this payout. | ## Line Items (rows 3-n) ### Line Item Headers (row 3) | Column Header | Description | | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Type](#line-item-type) | Describes the type of event (Order, Fee, Refund, etc.). | | Order capture date | The date at which the order was captured. This field is empty if the order has not yet been captured. | | Order created at | The date at which the order was created. | | Event date | The date at which the event took place. | | Order uuid | The uuid associated with the order. | | Customer order id | The customer's order number. | | External reference id | The external reference ID submitted with the order. | | Order Amount | The order amount for the ORDER event | | Amount | The amount of the event. | | Posting currency | The customer's currency code. | | Type code | A numeric code that corresponds with the Type field. | | Chargeback code | A numeric code that corresponds with the type of chargeback submitted. | | Sezzle order ID | The internal ID Sezzle has assigned to this order. | | [Product type](#line-item-product-type) | Describes the type of merchant product (Affiliate, Gift card, Standard\_checkout, etc.) | | Merchant identification number (MID) | The ID that identifies the merchant and the legitimacy of the business and facilitates the movement of funds from the customer’s bank account to the merchant’s bank account. | | Card Network Auth Ref | A unique numeric or alphanumeric identifier assigned to credit card transactions, making it easier to locate and identify an individual credit card transaction. | #### Line Item Type | Type | Description | Type Code | | ----------------------------------- | ----------------------------------------------------------------------------- | --------- | | ORDER | A completed order with Sezzle. | 001 | | REFUND | An order that has been refunded. | 002 | | FEE | The fee assessed by Sezzle for a given order. | 003 | | RETURNED\_FEE | A fee refunded by Sezzle. | 004 | | CHARGEBACK | A chargeback resulting from a disputed order. | 005 | | CHARGEBACK\_REVERSAL | A reversal of a chargeback resulting from a disputed order. | 006 | | CORRECTION | A manual correction to a payout. | 007 | | INTEREST\_TRANSFER | A transfer from the Sezzle interest account. | 008 | | REFERRAL\_REVENUE\_TRANSFER | A payment earned from Sezzle's merchant referral program. | 009 | | BANK\_ACCOUNT\_WITHDRAWAL | A withdrawal of funds from your bank to cover a negative balance with Sezzle. | 010 | | BANK\_ACCOUNT\_WITHDRAWAL\_REVERSAL | A failed BANK\_ACCOUNT\_WITHDRAWAL. | 011 | | CAPTURE | An order that has been captured. | 012 | #### Line Item Product Type | Type | Description | | ------------------- | ------------------------------------------------- | | standard\_checkout | Standard pay in four checkout | | four\_pay\_monthly | 4 pay monthly order | | six\_pay\_monthly | 6 pay monthly order | | long\_term\_lending | Base long term lending product with no promotions | | virtual\_card | Virtual card order | # Delete webhooks Source: https://docs.sezzle.com/docs/api/core/webhooks/deletev2webhooks delete /v2/webhooks/{webhooks_uuid} Delete webhooks to unsubscribe This action cannot be undone, use with extreme caution # List webhooks Source: https://docs.sezzle.com/docs/api/core/webhooks/getv2webhooks get /v2/webhooks Get a list of webhooks you are subscribed to ### Valid Webhook Events We accept the following Webhook events | Event | Trigger | | :--------------------------------- | :------------------------------------------------------------------ | | `customer.tokenized` | A customer is tokenized | | `order.authorized` | An order is authorized by Sezzle | | `order.captured` | An order is captured by Sezzle | | `order.refunded` | An order is refunded by Sezzle | | `dispute.merchant_input_requested` | A dispute is filed by a shopper and merchant input is required | | `dispute.deadline_approaching` | A dispute is moved to final notice by Sezzle | | `dispute.closed.customer_win` | The shopper wins the dispute and the order is refunded | | `dispute.closed.merchant_win` | The merchant wins the dispute and it is resolved in their favor | | `dispute.closed.neutral` | No clear winner is determined and the dispute is resolved neutrally | # Webhook Signature, Acceptance and Retries Source: https://docs.sezzle.com/docs/api/core/webhooks/infov2webhooks ## Webhook Signature * Secured with HMAC-SHA256 signature. * Sezzle-Signature header contains a hash of the webhook body, generated using the merchant private key. * Always verify the signature matches the webhook data to confirm it originates from Sezzle. ## Webhook Acceptance and Retries * Considered delivered upon receiving an HTTP 200 Status OK response. * Non-200 responses trigger retries: * Multiple attempts in the first hour. * A few attempts throughout the day. * Final attempts one day and three days later, spanning five days total. * If the final retry fails, the webhook subscription is deleted for all events. * To resume receiving webhooks, recreate the webhook. * Webhooks may not arrive in chronological order, as new ones can be sent before retries of older ones. * Retried webhooks use the current merchant private key for signing, so the signature may differ from the original if the key has changed. # Create webhooks Source: https://docs.sezzle.com/docs/api/core/webhooks/postv2webhooks post /v2/webhooks This endpoint can be used to subscribe to webhooks ### Valid Webhook Events We accept the following Webhook events | Event | Trigger | | :--------------------------------- | :------------------------------------------------------------------ | | `customer.tokenized` | A customer is tokenized | | `order.authorized` | An order is authorized by Sezzle | | `order.captured` | An order is captured by Sezzle | | `order.refunded` | An order is refunded by Sezzle | | `dispute.merchant_input_requested` | A dispute is filed by a shopper and merchant input is required | | `dispute.deadline_approaching` | A dispute is moved to final notice by Sezzle | | `dispute.closed.customer_win` | The shopper wins the dispute and the order is refunded | | `dispute.closed.merchant_win` | The merchant wins the dispute and it is resolved in their favor | | `dispute.closed.neutral` | No clear winner is determined and the dispute is resolved neutrally | ### Webhook Request Payload Unique identifier for the webhook event. Timestamp (ISO 8601) when the event was generated. Type of the event Available options: `customer.tokenized`, `order.authorized`, `order.captured`, `order.refunded`, `dispute.merchant_input_requested`, `dispute.deadline_approaching`, `dispute.closed.customer_win`, `dispute.closed.merchant_win`, `dispute.closed.neutral` Type of data associated with the event. Available options: `customer`, `order`, `dispute` Payload data specific to the event type. See options in the applicable accordion below. #### Examples per Event ```json { "uuid": string, "created_at": string, "event": string, "data_type": string, "data": { "token": string, "expiration": string, "customer": { "uuid": string, "created_at": string, "expiration": string } } } ``` ```json { "uuid": "e41c32d5-687d-414f-b5c6-d089bea52e7d", "created_at": "2025-04-12T00:11:01.749261Z", "event": "customer.tokenized", "data_type": "tokenize", "data": { "token": "ce56604a-5dfd-489a-80e9-753d0325dd46", "expiration": "2025-04-12T00:41:01.745145Z", "customer": { "uuid": "e0003e6a-7234-4440-9265-61906e8b8879", "created_at": "2025-04-12T00:11:01.745145Z", "expiration": "2026-04-12T00:11:01.745145Z" } } } ``` The merchant request token. The expiration date and time of the token. The customer details associated with the token. A unique identifier of the customer token. The creation date and time of the token for the customer. The expiration date and time of the token for the customer. ```json { "uuid": string, "created_at": string, "event": string, "data_type": string, "data": { "uuid": string, "authorization": { "uuid": string, "created_at": string, "authorization_amount": { "amount_in_cents": integer, "currency": string }, "approved": boolean, "expiration": string } } } ``` ```json { "uuid": "fdb263a1-a1dd-4feb-8749-c8a447977ebb", "created_at": "2025-04-12T00:15:39.281826Z", "event": "order.authorized", "data_type": "order", "data": { "uuid": "f36605a0-4a96-46d1-9d01-a0b17140dc57", "authorization": { "uuid": "28ef487d-8398-43bb-8354-5ebdd1eb7b40", "created_at": "2025-04-12T00:15:39.276841Z", "authorization_amount": { "amount_in_cents": 5000, "currency": "USD" }, "approved": true, "expiration": "2025-04-12T00:45:39.276841Z" } } } ``` The unique identifier for the order. Contains the authorization response details. The unique identifier for the authorization. ISO 8601 timestamp when the authorization was created. Amount and currency details of the authorized transaction. Authorized amount in cents. ISO 4217 currency code (e.g., USD). Indicates whether the authorization was approved. ISO 8601 timestamp when the authorization will expire. ```json { "uuid": string, "created_at": string, "event": string, "data_type": string, "data": { "uuid": string, "capture": { "uuid": string, "created_at": string, "amount": { "amount_in_cents": integer, "currency": string } } } } ``` ```json { "uuid": "6ee025c6-8acf-48fe-a6d6-b51693d64c60", "created_at": "2025-04-12T00:20:07.44668Z", "event": "order.captured", "data_type": "order", "data": { "uuid": "b87305a1-6be3-4877-bcf0-2b5b7dfaeaf0", "capture": { "uuid": "b69b1ba8-e977-4f26-9253-06f14d941696", "created_at": "2025-04-12T00:20:07.438365Z", "amount": { "amount_in_cents": 3000, "currency": "USD" } } } } ``` The unique identifier for the order. Contains the capture transaction details. The unique identifier for the capture. ISO 8601 timestamp when the capture was created. Amount and currency details of the capture. Captured amount in cents. ISO 4217 currency code (e.g., USD). ```json { "uuid": string, "created_at": string, "event": string, "data_type": string, "data": { "uuid": string, "refund": { "uuid": string, "created_at": string, "amount": { "amount_in_cents": integer, "currency": string } } } } ``` ```json { "uuid": "ed89f046-f55e-4fdd-9f65-ec3d8e961f99", "created_at": "2025-04-12T00:24:39.809499Z", "event": "order.refunded", "data_type": "order", "data": { "uuid": "b69f882d-06c3-4f2e-b6e3-ce7a6c46e455", "refund": { "uuid": "479e9d25-d0a5-49df-a2d3-6ca1d75b8c57", "created_at": "2025-04-12T00:24:39.805651Z", "amount": { "amount_in_cents": 500, "currency": "USD" } } } } ``` The unique identifier for the order. Contains the refund transaction details. The unique identifier for the refund. ISO 8601 timestamp when the refund was created. Amount and currency details of the refund. Refunded amount in cents. ISO 4217 currency code (e.g., USD). The following applies to the following webhooks: * `dispute.merchant_input_requested` * `dispute.deadline_approaching` * `dispute.closed.customer_win` * `dispute.closed.merchant_win` * `dispute.closed.neutral` ```json { "uuid": string, "created_at": string, "event": string, "data_type": string, "data": { "customer_name": string, "order_uuid": string, "order_reference_id": string, "order_date": string, "dispute_type": string, "dispute_due_date": string, "dispute_id": integer, "dispute_amount_in_cents": integer, "dispute_currency": string, "dispute_status": string } } ``` ```json { "uuid": "79f1e9cd-f1ef-42fa-b7b4-2ed8d9e9fae8", "created_at": "2025-04-11T17:22:22.717757Z", "event": "dispute.merchant_input_requested", "data_type": "dispute", "data": { "customer_name": "John Doe", "order_uuid": "e17280f3-d575-4bc2-99ff-ff881df7b137", "order_reference_id": "order-reference-id-123", "order_date": "2024-08-20", "dispute_type": "No Product Or Service", "dispute_due_date": "2025-04-08", "dispute_id": 132, "dispute_amount_in_cents": 2500, "dispute_currency": "USD", "dispute_status": "Closed All Win" } } ``` The name of the customer who filed the dispute. The unique identifier for the disputed order. The reference ID of the order The ISO 8601 date (YYYY-MM-DD) when the order was placed. The category or reason for the dispute (e.g., "No Product Or Service"). The deadline (ISO 8601 date) for merchant response or dispute action. The unique ID for the dispute The price of the dispute in cents ISO 4217 currency code (e.g., USD). The status of the dispute Available options: `Awaiting Merchant Response`, `Merchant Final Notice`, `Closed Merchant Loss`, `Closed Customer Loss`, `Closed All Win` # Trigger a test webhook Source: https://docs.sezzle.com/docs/api/core/webhooks/postv2webhooktest post /v2/webhooks/test Trigger a test event to mimic a webhook event at a given URL. ### Valid Webhook Events We accept the following Webhook events | Event | Trigger | | :--------------------------------- | :------------------------------------------------------------------ | | `customer.tokenized` | A customer is tokenized | | `order.authorized` | An order is authorized by Sezzle | | `order.captured` | An order is captured by Sezzle | | `order.refunded` | An order is refunded by Sezzle | | `dispute.merchant_input_requested` | A dispute is filed by a shopper and merchant input is required | | `dispute.deadline_approaching` | A dispute is moved to final notice by Sezzle | | `dispute.closed.customer_win` | The shopper wins the dispute and the order is refunded | | `dispute.closed.merchant_win` | The merchant wins the dispute and it is resolved in their favor | | `dispute.closed.neutral` | No clear winner is determined and the dispute is resolved neutrally | # Environments Source: https://docs.sezzle.com/docs/api/environments Before going live, you may test your integration with Sezzle using the Sezzle sandbox test environment, rather than the live production environment. ## **Accessing Sandbox and Production Environments** * A merchant who registers for a Sezzle production account automatically receives sandbox access * Default admin users of the production dashboard can also access the sandbox dashboard * Merchants can create a standalone sandbox account without a production account, ideal for testing production features without becoming a Sezzle merchant (e.g., during system integration) ## Testing Your Integration 1. Access the [sandbox](https://sandbox.dashboard.sezzle.com/merchant) 2. Log in using your Sezzle Merchant dashboard credentials 3. From the menu at the left select `Settings` > `API Keys` 4. Click the button labeled `create API key` 5. Follow the prompts to create public and private API keys * The same login can be used for both sandbox and production dashboards. * API keys for sandbox and production are not interchangeable: * Sandbox API keys cannot be used in the production dashboard. * Production API keys cannot be used in the sandbox. * The sandbox gateway URL is [https://sandbox.gateway.sezzle.com](https://sandbox.gateway.sezzle.com). 6. Start a checkout on your store website 7. Select `Sezzle` as the payment method 8. Complete the Sezzle checkout using the [test data](/docs/api/test-cards) 9. Verify that the order goes through Refer to [Postman Setup section](./postman-setup.mdx) on how to progmatically create orders and more leveraging [Sezzle Core API](/docs/api/core). # Errors Source: https://docs.sezzle.com/docs/api/errors Endpoints will return an array of standardized error objects on failures. We attempt to keep these errors as consistent as possible, and will announce any changes in advance if they are required. ## Error Response ```json [ { "code": string, "location": string, "message": string, "debug_uuid": string } ] ``` ```json [ { "code": "invalid", "location": "order.amount.amount_in_cents", "message": "Order amount must be greater than $35", "debug_uuid": "919f40d0-874b-4d98-810d-ed2246a8ad77" } ] ``` Error code Where the error occurred Message describing why error occured UUID identifying error # Introduction Source: https://docs.sezzle.com/docs/api/intro * Sezzle supports individually-authorized transactions for single purchases, with the latest version enabling customer tokenization for future transactions. * Integration options include: * Direct API integration * Lightweight JavaScript SDK * Integrations with popular eCommerce platforms * [Contact the Sezzle team](https://merchant-help.sezzle.com/hc/en-us/requests/new) for API-related questions. * An approved Sezzle account is required to start integration; [sign up](https://dashboard.sezzle.com/merchant/signup) if you don’t have one. Assume that all API methods require an [Authorization bearer token](./core/authentication/postauthentication#authenticated-call-http-header). ## Direct Integration Quick Start 1. Use API keys to obtain an [authentication token](./core/authentication/postauthentication) 2. [Create a session](./core/sessions/postv2session) with an [order object](./core/sessions/postv2session#body-order) 3. Redirect user to Sezzle checkout URL 4. User completes Sezzle checkout 5. Sezzle redirects user back to [merchant complete URL](./core/sessions/postv2session#body-complete-url) 6. Manage the order with the [Order API](./core/orders/getv2order) ## Open API Specification * The [OpenAPI Specification (OAS)](https://swagger.io/specification/) 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](https://gateway.sezzle.com/v2api.yaml) for integration details. * Import the Sezzle v2 OpenAPI Specification into the [Swagger Editor](https://editor.swagger.io/?url=https://gateway.sezzle.com/v2api.yaml) to generate a Sezzle client in multiple programming languages. * For languages unsupported by Swagger, use [OpenAPI Generator](https://openapi-generator.tech/) as an alternative tool. # Postman Setup Source: https://docs.sezzle.com/docs/api/postman-setup The Sezzle team has prepared a public Postman collection so merchants can quickly create customers (Sezzle users), sessions, and orders for sandbox testing. ### Download and Install Postman 1. Go to [postman.com/downloads](https://www.postman.com/downloads) 2. Click `Download the App` 3. When the installation file has finished downloading, click the file to install the application 4. Follow installation prompts on the screen ### Add Sezzle Gateway Collection When installation is complete, follow these steps to add the Sezzle Gateway collection to Postman. 1. Click `Run in Postman` below to run the collection [![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/9737967-e6ff8257-718a-4206-b6f0-7540e3b97060?action=collection%2Ffork\&collection-url=entityId%3D9737967-e6ff8257-718a-4206-b6f0-7540e3b97060%26entityType%3Dcollection%26workspaceId%3Dcf7fd793-2599-4aed-9b55-0871e7b27e1a) 2. In the Web page that opens, select your operating system 3. Click `Open Postman` if prompted 4. In Postman, the Sezzle Gateway collection is now displayed in the Collections tab ### Edit collection variables Next, copy your API Keys from the Sezzle Sandbox Dashboard into Postman. 1. In Postman, select Sezzle Gateway to open the collection tab 2. In the collection tab, click Variables. This tab will store your credentials that apply across the collection * Alternatively, move the API Keys and Gateway URL variables to your sandbox environment variables 3. To access your credentials, log in to the [Sezzle Sandbox Dashboard](https://sandbox.dashboard.sezzle.com/merchant/) 4. Go to `Settings` > `API Keys` - your sandbox credentials are [here](https://sandbox.dashboard.sezzle.com/merchant/settings/apikeys) 5. In Postman, paste your credentials into `CURRENT VALUE` * Do this for `PublicAPIKey` and `PrivateAPIKey` The other collection variables are predefined and all additional values will be automatically assigned for smoother testing. ### Using the collection 1. Open the applicable folder for your API version (default V2) 2. Refer to the below diagrams for request sequencing V1 Gateway Request Flow V2 Gateway Request Flow 3. Once a session is created, you must visit the checkout\_url in the response and complete the checkout before testing most other Orders endpoints. * Log in at sandbox.dashboard.sezzle.com/customer * The customer account does not need to match the customer details given in the session payload * The phone number for the customer account must be real, but other personal information can be fake * OTP will be `123123` # Test Data Source: https://docs.sezzle.com/docs/api/test-cards Test data is important to use in our Sandbox environment because it offers a way to use reliable forced responses. ## Phone and Personal Information * Use any valid US or CA phone number, real or fake * The expected OTP is `123123` * Personal information does not need to be real ## Test Credit Cards | Brand | Number | CVC | Expiration | | ---------- | ---------------- | ------------ | --------------- | | Visa | 4242424242424242 | Any 3 digits | Any future date | | Mastercard | 5555555555554444 | Any 3 digits | Any future date | | Amex | 371449635398431 | Any 4 digits | Any future date | | Amex | 378282246310005 | Any 4 digits | Any future date | | Discover | 6011111111111117 | Any 3 digits | Any future date | ## Checkout Testing * Use your [sandbox API keys](https://sandbox.dashboard.sezzle.com/merchant/settings/apikeys) when testing in a test environment * Use your [production API keys](https://dashboard.sezzle.com/merchant/settings/apikeys) when testing in a live environment 1. On your website, add an item to your cart, then proceed to Checkout and select `Sezzle` as the payment method 2. Click `Place Order` If you are redirected to the Sezzle checkout page, your integration is complete. 3. In sandbox, use the above test data to complete the Sezzle checkout and you should be redirected back to your website In production, **BE CAREFUL** when completing the Sezzle checkout, as you will be charged. You can identify the Sezzle environment by observing if "sandbox" is included in the Sezzle checkout URL. # Delete a customer Source: https://docs.sezzle.com/docs/api/tokenization/customers/deletev2token delete /v2/customer/{customer_uuid} Delete an existing tokenized customer # Get a customer Source: https://docs.sezzle.com/docs/api/tokenization/customers/getv2customer get /v2/customer/{customer_uuid} Get details on an existing tokenized customer # Get a list of customers Source: https://docs.sezzle.com/docs/api/tokenization/customers/getv2customerlist get /v2/customer Retrieve a list of existing tokenized customers # Create order by customer Source: https://docs.sezzle.com/docs/api/tokenization/customers/postv2customerorder post /v2/customer/{customer_uuid}/order Create an order for a tokenized customer 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. **Note:** If you plan to tokenize a customer for the purpose of creating orders by a customer, please be advised that these orders will not include any financing options. # Preapprove amount by customer Source: https://docs.sezzle.com/docs/api/tokenization/customers/preapprovev2token post /v2/customer/{customer_uuid}/preapprove Verify tokenized customer will be approved for the amount of the order prior to order creation. This API does not authorize the amount nor does it hold the amount for a future order. Also, you are not required to use this API before creating a customer order. An example use-case is to verify approval status ahead of subscription payment due date, and to contact the customer in advance to avoid failed payment. # Introduction Source: https://docs.sezzle.com/docs/api/tokenization/intro Customer tokenization allows merchants to store Sezzle as a payment method for future orders without customer interaction, ideal for subscriptions like semi-annual charges. All tokenized orders will be processed as Pay in Full. The approval URL was deprecated in April 2025. Now, the only way for customers to authorize you to process future transactions on tokenized orders is by selecting that option in the initial checkout process. To obtain that authorization: 1. Initiate and tokenize the order in a single session 2. Redirect the customer to the checkout URL For detailed instructions, view the Tokenization Process below. ## Tokenization Process ![Group7 Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/api/tokenization/Group7.png) 1. Tokenize Customer via Checkout * The merchant calls `/v2/session` with `tokenize: true`, optionally including customer details to speed up registration for new Sezzle users. * Sezzle returns a session `tokenize` token. 2. Merchant Redirects User to Checkout URL * Customer sees option to allow merchant to process payments from their Sezzle account for future transactions. * The customer may decide to allow this permission before completing their checkout. The only way for customers to authorize you to process future transactions on tokenized orders is by selecting that option in the initial checkout process. ![Image Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/api/tokenization/image.png) * If agreed, Sezzle redirects back to the merchant’s session complete URL, appending a `customer-uuid` query parameter. * Alternatively, the merchant can call `/v2/token` with the session tokenize token to retrieve the UUID. 3. Charge Customer * The merchant uses the `customer-uuid` to create orders via `/v2/customer/{customer_uuid}/order`. * If the authorization is approved, the merchant can manage the order (release, capture, or refund) using `/v2/order` endpoints. ## Notes * Tokenization is optional, recommended only for charging via Sezzle outside standard checkouts. * Orders created via customer UUID are treated the same as those from a standard Sezzle checkout. ## Customers Use the customers endpoints to: * [Delete](/docs/api/tokenization/customers/deletev2token) a customer * [Get](/docs/api/tokenization/customers/getv2customer) details on an existing customer * [Get](/docs/api/tokenization/customers/getv2customerlist) a list of customers * [Create](/docs/api/tokenization/customers/postv2customerorder) an order for a customer * [Preapprove](/docs/api/tokenization/customers/preapprovev2token) an amount for the customer Customers are only those Sezzle users that have agreed to be tokenized by the merchant. A customer is unique to a merchant. This API does not include all Sezzle users. # Get session tokenization Source: https://docs.sezzle.com/docs/api/tokenization/session/getv2sessiontoken get /v2/token/{token}/session Get the current state of a tokenization session. # Complete a Checkout Source: https://docs.sezzle.com/docs/api/v1/complete-a-checkout post /v1/checkouts/{order_reference_id}/complete Initiate order payment capture if `merchant_completes` was `true` at Create Checkout. An example use-case is if users need to return to the merchant's site before finalizing the purchase with Sezzle. Submit the Complete Checkout request within 30 minutes after the user is redirected to the merchant's site. Failure to do so results in Sezzle canceling the checkout. The default expiration period for new orders can be extended up to 7 days via the Merchant Dashboard. # Create a Checkout Source: https://docs.sezzle.com/docs/api/v1/create-a-checkout post /v1/checkouts Initiate a Sezzle session with shopper order details, redirect links, and capture settings # Interest Account Activity Request Source: https://docs.sezzle.com/docs/api/v1/interest-account-reports/interest-account-activity-request get /v1/interest/activity If you are enrolled in the interest account program, get the current activity on the interest account. # Interest Account Balance Request Source: https://docs.sezzle.com/docs/api/v1/interest-account-reports/interest-account-balance-request get /v1/interest/balance If you are enrolled in the interest account program, get the current balance on the interest account. Fractions of cents are tracked to properly calculate daily interest accrual even if the interest balance is low. # Obtain Authentication Token Source: https://docs.sezzle.com/docs/api/v1/obtain-authentication-token post /v1/authentication Generate authentication token from your Sezzle merchant API keys for use in the header of all other API requests. # Orders Source: https://docs.sezzle.com/docs/api/v1/orders get /v1/orders/{order_reference_id} Get details and check the status of an existing order # Refund Request Source: https://docs.sezzle.com/docs/api/v1/refund-request post /v1/orders/{order_reference_id}/refund Refund an amount by order, either partial or in full. An example use-case is when an order was captured but the customer returned item(s) that requires them to be refunded. # Setting Your Configuration Source: https://docs.sezzle.com/docs/api/v1/setting-your-configuration post /v1/configuration Configure webhook URL ## 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 ```json { "time": string, "uuid": string, "type": string, "event": string, "object_uuid": string, "refund_id": string, "refund_amount": { "amount_in_cents": number, "currency": string } } ``` ```json { "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" } } ``` The time (UTC) at which the Webhook was generated. A unique identifier for the webhook. The high-level category. Available options: `order_update` (coming soon) The ID for the Checkout/Order. Available options: `order_complete`, `order_refund` The ID for the Checkout/Order. For order update webhooks, the `object_uuid` returned is the reference ID provided during checkout creation by the merchant Unique ID for a refund. Included if the webhook event is order\_refund Price object. Included if the webhook event is order\_refund. The amount in cents The 3 character currency code as defined by ISO 4217 # Settlement Details Request Source: https://docs.sezzle.com/docs/api/v1/settlement-reports/settlement-details-request get /v1/settlements/details/{payout_uuid} Get details on a specific settlement payout. The settlement details response contains two sections. The first two rows are a summary of the payout. The remaining rows contain the individual line items that contributed to the payout. ### Summary Column Definitions | Column Header | Description | | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `Total order amount` | The sum of all orders on this payout. | | `Total refund amount` | The sum of all refunds on this payout. | | `Total fee amount` | The sum of all fees on this payout. | | `Total returned fee amount` | The sum of all returned fees on this payout. | | `Total chargeback amount` | The sum of all chargebacks on this payout. | | `Total chargeback reversal amount` | The sum of all chargeback reversals on this payout. | | `Total interest transfer amount` | The sum of all interest transfers on this payout. If you are not participating in the interest program, this field will be omitted. | | `Total correction amount` | The sum of all corrections on this payout. | | `Total referral revenue transfer amount` | The sum of all referral revenue transfers on this payout. | | `Total bank account withdrawal amount` | The sum of all bank account withdrawals. | | `Total bank account withdrawal reversal amount` | The sum of all bank account withdrawal reversals, which reflect a bank account withdrawal that has failed. | | `Forex fees` | The cost of foreign exchange fees associated with this payout. | | `Net settlement amount` | Net amount of settlement. | | `Payment uuid` | The UUID for this payout. | | `Settlement currency` | The currency in which this payout was sent. | | `Payout date` | The date this payout was sent. | | `Payout status` | The current status of this payout. | ### Line Item Column Definitions | Column Header | Description | | ----------------------- | ----------------------------------------------------------------------------------------------------- | | `Type` | Describes the type of event (Order, Fee, Refund, etc.). | | `Order capture date` | The date at which the order was captured. This field is empty if the order has not yet been captured. | | `Order created at` | The date at which the order was created. | | `Event date` | The date at which the event took place. | | `Order uuid` | The uuid associated with the order. | | `Customer order id` | The customer's order number. | | `External reference id` | The external reference ID submitted with the order. | | `Amount` | The amount of the event. | | `Posting currency` | The customer's currency code. | | `Type code` | A numeric code that corresponds with the Type field. | | `Chargeback code` | A numeric code that corresponds with the type of chargeback submitted. | | `Sezzle order ID` | The internal ID Sezzle has assigned to this order. | ### Line Item Event Type Definitions | Type | Description | Type Code | | ---------------------------------- | ----------------------------------------------------------------------------- | --------- | | `ORDER` | A completed order with Sezzle. | 001 | | `REFUND` | An order that has been refunded. | 002 | | `FEE` | The fee assessed by Sezzle for a given order. | 003 | | `RETURNED_FEE` | A fee refunded by Sezzle. | 004 | | `CHARGEBACK` | A chargeback resulting from a disputed order. | 005 | | `CHARGEBACK_REVERSAL` | A reversal of a chargeback resulting from a disputed order. | 006 | | `CORRECTION` | A manual correction to a payout. | 007 | | `INTEREST_TRANSFER` | A transfer from the Sezzle interest account. | 008 | | `REFERRAL_REVENUE_TRANSFER` | A payment earned from Sezzle's merchant referral program. | 009 | | `BANK_ACCOUNT_WITHDRAWAL` | A withdrawal of funds from your bank to cover a negative balance with Sezzle. | 010 | | `BANK_ACCOUNT_WITHDRAWAL_REVERSAL` | A failed BANK\_ACCOUNT\_WITHDRAWAL. | 011 | # Settlement Summaries Request Source: https://docs.sezzle.com/docs/api/v1/settlement-reports/settlement-summaries-request get /v1/settlements/summaries Get a summarized list of settlement payouts. # v1 Overview Source: https://docs.sezzle.com/docs/api/v1/v1 You are viewing Version 1 of the Sezzle API. Check out the [current version](/docs/api/intro)! * Sezzle API v1 is designed for merchants wanting to accept Sezzle as a payment option. * The Sezzle [Integration Flow](#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](https://dashboard.sezzle.com/merchant/signup) 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](https://sandbox.dashboard.sezzle.com/merchant/settings/apikeys). ### Test Data You can use the following test data to test your integration: | Bank | Username | Password | | ----------- | -------- | -------- | | `Test Bank` | `demo` | `go` | | Card Number | CVV/CVC | Expiration Data | Name | Address | | ------------------ | ----------------- | --------------- | ----- | ------- | | `4242424242424242` | `any (3 numbers)` | `any` | `any` | `any` | ### 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)](https://swagger.io/specification/) 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](https://gateway.sezzle.com/v2api.yaml) for integration details. * Import the Sezzle v2 OpenAPI Specification into the [Swagger Editor](https://editor.swagger.io/?url=https://gateway.sezzle.com/v2api.yaml) to generate a Sezzle client in multiple programming languages. * For languages unsupported by Swagger, use [OpenAPI Generator](https://openapi-generator.tech/) as an alternative tool. ## Integration Flow ![Api Flow Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/api/Group3.png) ### 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 | Parameter | Type | Description | | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `amount*` | object | A 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_id` | string | UUID for the Refund. Must be unique to a Merchant. | | `refund_reason` | string | A reason for the refund. | | `is_full_refund` | boolean | Overrides `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](/#javascript-sdk). 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 ```javascript 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 ```javascript 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](https://github.com/sezzle/sezzle-js). * Refer to the latest documentation for widget configuration details. # About Sezzle Page Source: https://docs.sezzle.com/docs/guides/about-sezzle Including a dedicated page about Sezzle on your website helps customers understand how Sezzle works and highlights the benefits of using it as a payment option. We provide a pre-made HTML template to simplify the process. To get started: 1. Select your website platform 2. Copy the code from the "Code Snippets" section and integrate it into your site to create the page To see a sample of what the page looks like, click [here](https://sezzle-test.myshopify.com/pages/how-sezzle-works). ## Shopify Process To set up the page on Shopify, follow the steps below. 1. Log in to your Shopify Store 2. Navigate to `Online Store` > `Themes` 3. On the theme you want to edit, select `Actions` and then `Edit Code` 4. Under the `Templates` folder, click `Add New Template`, select template for `Page`, template type `liquid`, and name the page `Sezzle`, then click `Create Template` 5. Select the theme that best fits your store from the tabs listed 6. Copy the code and paste it under `{{page.content}}` on the Shopify page 7. Save 8. Navigate to `Pages` 9. Add a new page, and give it a title - we recommend something like `How Sezzle Works` or `How to use Sezzle` 10. Under `Theme Template` (in the bottom-right), select `sezzle` 11. Save and view the page ## Add the page to your navigation 1. Go to `Online Store` > `Navigation` 2. Select the menu where you would like the Sezzle link to appear (ex: Main menu) 3. Click `Add menu item` 4. Enter the text you wish to appear (ex: How Sezzle Works) 5. Click the second box, select `Pages` then the page you just created 6. Click `Add` 7. Click `Save Menu` ## Other Platforms To set up the page on any other platform, please work with your web developer and/or follow the steps below. 1. Create a new page in your theme 2. Copy and paste the code into your website's page 3. Click save and/or publish! ## Code Snippet Insert the following code into your HTML file: ```html [expandable]
```
```html [expandable]
```
Your merchant ID which is of the format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` [Find it here](https://dashboard.sezzle.com/merchant/settings/business). Renders the page design in dark or light mode Available options: `dark`, `light` Controls the translation of the page content Available options: `en`, `fr`
# AI Assistance Source: https://docs.sezzle.com/docs/guides/ai-assistance All of our documentation pages are hosted in a variety of markdown formats to make it easier for you to feed our docs into large language models (LLMs) for specific information retrieval. ## Supported formats We support industry standards such as [/llms.txt](https://llmstxt.org) as well as additional markdown formats. * A markdown file of a structured index of our docs is hosted at [https://docs.sezzle.com/llms.txt](https://docs.sezzle.com/llms.txt). A markdown file of our docs content is hosted at [https://docs.sezzle.com/llms-full.txt](https://docs.sezzle.com/llms-full.txt). # Authorize & Capture Source: https://docs.sezzle.com/docs/guides/auth-and-capture Merchants integrating Sezzle into their eCommerce platform can choose between two payment settings: `Authorize Only` or `Authorize and Capture`. This page provides a detailed explanation of the differences between these options to help you select the best setting for your needs. ### **Authorize Only** * Payment will only be automatically authorized, not captured, after a successful checkout * In the History section of order details, the `Captured` field displays 0, and `Not Captured` displays the order amount * If `Authorize Only` is set, you must capture the order amount manually before the auth is expired in order to mark the payment as paid ### **Authorize and Capture** * Payment is captured automatically after a successful checkout. * In the `History`section of order details, the `Captured` field displays the order amount, and `Not Captured` displays 0 ### Notes * The default authorization expiration is 30 minutes for all merchants except Shopify, whose default is 7 days * You can extend this up to a maximum of 7 days * Once the authorization expires, capturing is denied, and any uncaptured amount is released * If the order total is not captured before expiration, the order is deleted * Payment is considered paid only when the amount is captured * If the order amount shows `Not Captured` and the `Captured` value in the `History` section of the Merchant Dashboard is 0, the order amount has not been captured * If the amount remains uncaptured before the authorization expires, the order will be deleted ### How to Change Authorization Expiration in Merchant Dashboard 1. Log in to your Merchant Dashboard account 2. Go to the `Settings` > `Payment Captures` > `Authorization Expiration Period` and click `update` 3. Set the value for days, hours, and minutes and click `confirm` # Using Direct Javascript SDK Source: https://docs.sezzle.com/docs/guides/direct/integration The Javascript SDK can be used for a simple, lightweight integration, but it also includes an in-context mode which will host the Sezzle checkout in a modal iframe or pop-up window. Create checkouts and capture payments with Sezzle. Checkout in an iframe, pop-up window, or redirect to Sezzle. Handle payment success, failure, or cancel with your Sezzle orders. Render the Sezzle checkout button on your store. ## Include SDK code Include the following script in the `` section of the page. ```html ``` ## Checkout Configuration The first requirement to get started with the direct JavaScript SDK is to configure a new Checkout object. ### Configuration Options ```javascript const checkoutSdk = new Checkout({ mode: string, publicKey: string, apiMode: string, apiVersion: string, }); ``` ```javascript const checkoutSdk = new Checkout({ mode: "popup", publicKey: "qxorvmr7zbww7yw8vvhlxi8s3uko18q7", apiMode: "sandbox", apiVersion: "v2", }); ``` Available options: `popup`, `iframe`, `redirect` **popup** mode will work out-of-the-box. No additional configuration is required to use **popup**. Sezzle currently recommends **popup** mode. **iframe** mode will not work properly without first contacting Sezzle. For security reasons, Sezzle must enable **iframe** for your domain(s). To have it enabled, please submit a request with your Sezzle Merchant UUID and a list of domains to be allowed per environment (production and sandbox). For example, [*please enable uat1.mysite.com, uat2.mysite.com in sandbox and www.mysite.com, mysite.com in production*](http://www.mysite.com). The integration for **popup** and **iframe** are identical, aside from the mode. Using **popup** mode will expedite your development. Upon completing the integration, if **iframe** is a requirement, then contact Sezzle to enable your domain(s) and switch the mode to **iframe**. Used when creating a checkout or capturing payment. Find your API keys at [https://dashboard.sezzle.com/merchant/settings/apikeys](https://dashboard.sezzle.com/merchant/settings/apikeys) Environment in which the checkout is to be completed Available options: `live`, `sandbox` Sezzle Checkout SDK Version Available options: `v2` ## Sezzle Button ### Sezzle Button Configuration Create a placeholder element for the Sezzle Button to be rendered on the page(s). ```html
```
```html
```
Text to appear inside the button. Use `%%logo%%` inside the text to display the Sezzle image Available options: `square`, `semi-rounded` Custom classes to be applied Negative space between top of content and edge of button Negative space between bottom of content and edge of button Negative space between left side of content and edge of button Negative space between right side of content and edge of button Width of the Sezzle logo within the button Position of the Sezzle logo from top. Position of the Sezzle logo from bottom. Position of the Sezzle logo from left. Position of the Sezzle logo from right. Spacing between the templateText letter. Width of the button Height of the button.
### Render the Sezzle Button Requires having the `checkout` object created from above to render the button. Call `renderSezzleButton` passing the `id` of the placeholder element defined in Button Configuration, above. ```javascript checkoutSdk.renderSezzleButton("sezzle-smart-button-container"); ``` ## Initialize the Checkout ### Event Handlers The SDK requires the following event handlers that can be used to extend features in your application. ```javascript checkoutSdk.init({ onClick: function () { event.preventDefault(); checkoutSdk.startCheckout({...}); }, onComplete: function (event) { console.log(event.data); }, onCancel: function () { console.log("Checkout cancelled."); }, onFailure: function () { console.log("Checkout failed."); }, }); ``` ```javascript [expandable] checkoutSdk.init({ onClick: function () { event.preventDefault(); checkoutSdk.startCheckout({ checkout_payload: { order: { intent: "AUTH", reference_id: "543645yg5tg5675686", description: "sezzle-store - #12749253509255", order_amount: { amount_in_cents: 10000, currency: "USD", }, }, }, }); }, onComplete: function (event) { console.log(event.data); }, onCancel: function () { console.log("Checkout cancelled."); }, onFailure: function () { console.log("Checkout failed."); }, }); ``` Sezzle Button is clicked by the user. See [Checkout Initialization](#checkout-initialization) section for payload options. Sezzle payment is successfully completed. A successfully completed Sezzle checkout will trigger an event to the `onComplete` handler. The event should include a data object with data relevant to the start checkout input parameter. Sezzle payment is cancelled. If the user exits the Sezzle checkout for any reason, the `onCancel` handler will be executed. Sezzle payment has failed. If there is an error loading the Sezzle checkout page, the `onFailure` handler will be executed. ### Checkout Initialization ```javascript checkoutSdk.startCheckout({ checkout_payload: { order: { intent: string, reference_id: string, description: string, order_amount: { amount_in_cents: integer, currency: string, }, }, }, }); ``` ```javascript checkoutSdk.startCheckout({ checkout_payload: { order: { intent: "AUTH", reference_id: "543645yg5tg5675686", description: "sezzle-store - #12749253509255", order_amount: { amount_in_cents: 10000, currency: "USD", }, }, }, }); ``` The order for this session If your checkout flow requires the user to confirm their checkout on your site after being approved by Sezzle, use “AUTH” as your intent. If you prefer the checkout be captured immediately, use “CAPTURE”. Available options: `AUTH`, `CAPTURE` Your reference ID for this order (must contain only alphanumeric characters, dashes (-), and underscores (\_)) Your description for this order The total amount of the order The amount of the item in cents The 3 character currency code as defined by ISO 4217 Alternatively, start checkout by URL: ```javascript checkout.startCheckout({ checkout_url: "https://checkout.sezzle.com/?id=example", }); ``` Start checkout should be implemented in the checkout `onClick` handler. There are two methods for hosting a checkout. **Use a checkout payload as detailed in the Session Object** * The cancel and complete URLs are not required for `iframe` and `popup` mode. **Use an existing checkout URL** * The `mode` used when configuring the SDK checkout must match the `checkout_mode` when [creating a session](/docs/api/core/sessions/postv2session). * The parent window `origin` must be provided in the cancel and complete urls when the `checkout_mode` is `iframe` or `popup`. **Customer Tokenization** This is not supported in the `onComplete` event. To receive a customer UUID, subscribe to the [customer.tokenized](/docs/api/core/webhooks/postv2webhooks#valid-webhook-events) event. ### Checkout completed by Payload ```javascript function onCompleteHandler(event) { var data = event.data || Object.create(null); console.log("session data:", data.session_uuid, data.order_uuid); } checkout.init({ onComplete: onCompleteHandler, }); ``` ### Checkout completed by URL ```javascript function onCompleteHandler(event) { var data = event.data || Object.create(null); console.log("checkout data:", data.checkout_uuid); } checkout.init({ onComplete: onCompleteHandler, }); ``` ### Capture Payment Capturing an order is not required if the `CAPTURE` intent was used when creating the checkout. ```javascript var payload = { capture_amount: { amount_in_cents: integer, currency: string, }, }; checkout.capturePayment(data.order_uuid, payload); ``` ```javascript var payload = { capture_amount: { amount_in_cents: 5000, currency: "USD", }, }; checkout.capturePayment(data.order_uuid, payload); ``` The capture payment method requires two parameters, the `order_uuid` and the payload as detailed in the [Capture Amount By Order Object](/docs/api/core/orders/postv2capturebyorder). The amount to capture on this order The amount in cents The 3 character currency code as defined by ISO 4217 ## Installment Plan ```javascript const checkout = new Checkout({}); checkout.getInstallmentPlan(1000); ``` ```json { "schedule": string, "totalInCents": integer, "installments": [ { "installment": integer, "amountInCents": integer, "dueDate": string } ] } ``` ```json { "schedule": "bi-weekly", "totalInCents": 1000, "installments": [ { "installment": 1, "amountInCents": 250, "dueDate": "2020-10-14" }, { "installment": 2, "amountInCents": 250, "dueDate": "2020-10-28" }, { "installment": 3, "amountInCents": 250, "dueDate": "2020-11-11" }, { "installment": 4, "amountInCents": 250, "dueDate": "2020-11-25" } ] } ``` Payment cadence for installment plan Total order amount in cents Breakdown of each payment due Number of installment in series Installment amount in cents Due date of the installment This function will provide the installment details based on an amount in cents. An existing [checkout](#checkout-initialization) can be used, or a `checkout` without any configuration can also be used to quickly get installment details. # Introduction Source: https://docs.sezzle.com/docs/guides/direct/introduction ## Direct Integration Order Flow ![Overview Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/Group2.png) 1. Request Payment Session Creation * The Merchant Server sends a request to the Sezzle API to create a payment session for the customer’s order, including details like the order amount, items, and customer information. 2. Generate Session and Redirect URL * The Sezzle API processes the request, creates a session linked to the order, and generates a redirect URL for the customer to access the Sezzle UI for payment processing. 3. Receive Redirect URL from Sezzle API * The Sezzle API sends the generated redirect URL to the Merchant Server, allowing the merchant to proceed with customer redirection. 4. Redirect Customer to Sezzle UI * Using the redirect URL, the Merchant Server directs the customer to the Sezzle UI to complete the payment process. 5. Process Customer Checkout in Sezzle UI * The customer reviews the order in the Sezzle UI and completes the checkout. * Sezzle assesses the customer’s financing eligibility (e.g., via a credit check), approving or denying the transaction. * If denied, the customer must use an alternative payment method. 6. Redirect Customer Back to Merchant Site (Optional) * After checkout (approved or denied), Sezzle redirects the customer to the Merchant Site. * The merchant may display a confirmation page showing the order status (e.g., “Order Confirmed” or “Payment Failed”). * This step is optional based on the merchant’s preference. 7. Request Fund Capture * Upon payment approval, the Merchant Server sends a request to the Sezzle API to capture the order funds, either in full or partially (e.g., for partial shipments). 8. Receive Transaction Status from Sezzle API * The Sezzle API processes the capture request and returns the transaction status to the Merchant Server. * The status indicates whether the funds were captured successfully or if issues occurred (e.g., insufficient funds). * The merchant updates their system and notifies the customer accordingly. # Manual Integration Source: https://docs.sezzle.com/docs/guides/direct/manual The [Javascript SDK](./integration) is a great way to get started but if not available for your implementation you can perform all necessary actions on your own. ## Quick Start Guide 1. Use API keys to obtain an [authentication](/docs/api/core/authentication/postauthentication) token 2. Create a [session](/docs/api/core/sessions/postv2session) with an order object 3. Redirect user to Sezzle checkout URL 4. User completes Sezzle checkout 5. Sezzle redirects user back to merchant complete URL 6. Manage the order with the [Orders API](/docs/api/core/orders/getv2order) 7. Subscribe to all necessary [Webhook Events](/docs/api/core/webhooks/postv2webhooks) # Configuration Source: https://docs.sezzle.com/docs/guides/express/express-checkout The Sezzle Express checkout button is a powerful tool for custom platform merchants. Integrated directly into the cart page, the button allows shoppers to select Sezzle as their payment method with a single click, leveraging their Sezzle account for a seamless payment experience. This feature is designed to reduce cart abandonment, increase conversion rate, and enhance customer satisfaction. ## Installation ### Include SDK code Include the following script in the `` section of the page. ```html ``` ### Checkout Configuration #### Configuration Options ```javascript const checkoutSdk = new ExpressCheckout({ mode: string, publicKey: string, apiMode: string, apiVersion: string, }); ``` ```javascript const checkoutSdk = new ExpressCheckout({ mode: "popup", publicKey: "qxorvmr7zbww7yw8vvhlxi8s3uko18q7", apiMode: "live", apiVersion: "v2", }); ``` Available options: `popup`, `iframe`, `redirect` **popup** mode will work out-of-the-box. No additional configuration is required to use **popup**. Sezzle currently recommends **popup** mode. **iframe** mode will not work properly without first contacting Sezzle. For security reasons, Sezzle must enable **iframe** for your domain(s). To have it enabled, please submit a request with your Sezzle Merchant UUID and a list of domains to be allowed per environment (production and sandbox). For example, [*please enable uat1.mysite.com, uat2.mysite.com in sandbox and www.mysite.com, mysite.com in production*](http://www.mysite.com). The integration for **popup** and **iframe** are identical, aside from the mode. Using **popup** mode will expedite your development. Upon completing the integration, if **iframe** is a requirement, then contact Sezzle to enable your domain(s) and switch the mode to **iframe**. Used when creating a checkout or capturing payment. Find your API keys at [https://dashboard.sezzle.com/merchant/settings/apikeys](https://dashboard.sezzle.com/merchant/settings/apikeys) Environment in which the checkout is to be completed Available options: `live`, `sandbox` Sezzle Checkout SDK Version Available options: `v2` ### Sezzle Button #### Sezzle Button Configuration Create a placeholder element for the Sezzle Button to be rendered on the page(s). ```html
```
```html
```
Text to appear inside the button. Use `%%logo%%` inside the text to display the Sezzle image Available options: `square`, `semi-rounded` Custom classes to be applied Negative space between top of content and edge of button Negative space between bottom of content and edge of button Negative space between left side of content and edge of button Negative space between right side of content and edge of button Width of the Sezzle logo within the button Position of the Sezzle logo from top. Position of the Sezzle logo from bottom. Position of the Sezzle logo from left. Position of the Sezzle logo from right. Spacing between the templateText letter. Width of the button Height of the button.
#### Render the Sezzle Button Requires having the checkout object created from above to render the button. Call renderSezzleButton passing the id of the placeholder element defined in Button Configuration, above. ```javascript await checkoutSdk.renderSezzleButton("sezzle-smart-button-container"); ``` ### Initialize the Checkout #### Event Handlers The SDK requires the following event handlers that can be used to extend features in your application. ```javascript [expandable] checkoutSdk.init({ onClick: function () { event.preventDefault(); checkoutSdk.startCheckout({...}); }, onComplete: function (response) { checkoutSdk .capturePayment(response.data.order_uuid, {...}) .then((r) => { console.log(r); }); }, onCancel: function () { alert("Transaction cancelled."); }, onFailure: function () { alert("Transaction failed."); }, onCalculateAddressRelatedCosts: async function ( shippingAddress, order_uuid ) { // Call authentication endpoint const response = await fetch( "https://gateway.sezzle.com/v2/authentication", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ public_key: string, private_key: string, }), } ); const data = await response.json(); const token = data.token; const updateResponse = await fetch( `https://gateway.sezzle.com/v2/order/${order_uuid}/checkout`, { method: "PATCH", headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}`, }, body: JSON.stringify({ amount_in_cents: integer, currency_code: string, shipping_amount_in_cents: integer, tax_amount_in_cents: integer, address_uuid: shippingAddress.uuid, }), } ); const updateStatus = updateResponse.ok; return { ok: updateStatus, }; }, }); ``` ```javascript [expandable] checkoutSdk.init({ onClick: function () { event.preventDefault(); checkoutSdk.startCheckout({ checkout_payload: { // "cancel_url":{ // "href": "http://localhost:44300/demo/v2checkout.html" // }, // "complete_url":{ // "href": "http://localhost:44300/demo/v2checkout.html" // }, is_express_checkout: true, order: { intent: "AUTH", reference_id: "543645yg5tg5675686", description: "sezzle-store - #12749253509255", requires_shipping_info: false, items: [ { name: "widget", sku: "sku123456", quantity: 1, price: { amount_in_cents: 1000, currency: "USD", }, }, ], discounts: [ { name: "20% off", amount: { amount_in_cents: 1000, currency: "USD", }, }, ], metadata: { location_id: "123", store_name: "Downtown Minneapolis", store_manager: "Jane Doe", }, shipping_amount: { amount_in_cents: 1000, currency: "USD", }, tax_amount: { amount_in_cents: 1000, currency: "USD", }, order_amount: { amount_in_cents: 10000, currency: "USD", }, }, }, }); }, onComplete: function (response) { alert("Completed transaction. Capture started."); checkoutSdk .capturePayment(response.data.order_uuid, { capture_amount: { amount_in_cents: 10000, currency: "USD", }, partial_capture: false, }) .then((r) => { console.log(r); }); }, onCancel: function () { alert("Transaction cancelled."); }, onFailure: function () { alert("Transaction failed."); }, onCalculateAddressRelatedCosts: async function ( shippingAddress, order_uuid ) { // Call authentication endpoint const response = await fetch( "https://gateway.sezzle.com/v2/authentication", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ public_key: "qxorvmr7zbww7yw8vvhlxi8s3uko18q7", private_key: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyaWQiOjEsInNjb3BlIjoibWVyY2hhbnRhcGkiLCJleHAiOjQ2MzM3MTg3MDYsImlzcyI6IlNlenpsZSJ9.Ez4-gbBpb5iTRJ9VCVD97IrjS98v1NalZlL2fHU2KSA", }), } ); const data = await response.json(); const token = data.token; const updateResponse = await fetch( `https://gateway.sezzle.com/v2/order/${order_uuid}/checkout`, { method: "PATCH", headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}`, }, body: JSON.stringify({ amount_in_cents: 11500, currency_code: "USD", shipping_amount_in_cents: 500, tax_amount_in_cents: 1000, address_uuid: shippingAddress.uuid, }), } ); const updateStatus = updateResponse.ok; return { ok: updateStatus, }; }, }); ``` Sezzle Button is clicked by the user. See [Checkout Initialization](#checkout-initialization) section for payload options. Sezzle payment is successfully completed. A successfully completed Sezzle checkout will trigger an event to the `onComplete` handler. The event should include a data object with data relevant to the start checkout input parameter. See [capturePayment](#capture-payment) section for payload options. Sezzle payment is cancelled. If the user exits the Sezzle checkout for any reason, the `onCancel` handler will be executed. Sezzle payment has failed. If there is an error loading the Sezzle checkout page, the `onFailure` handler will be executed. Required if `is_express_checkout` is `true`. Once shopper has provided shipping address via Sezzle express checkout, this function should return tax and shipping costs to Sezzle. #### Checkout Initialization ```javascript [expandable] checkoutSdk.startCheckout({ checkout_payload: { // "cancel_url":{ // "href": string // }, // "complete_url":{ // "href": string // }, is_express_checkout: boolean, order: { intent: string, reference_id: string, description: string, requires_shipping_info: boolean, items: [ { name: string, sku: string, quantity: integer, price: { amount_in_cents: integer, currency: string, }, }, ], discounts: [ { name: string, amount: { amount_in_cents: integer, currency: string, }, }, ], metadata: { some_property: string, some_other_property: string }, shipping_amount: { amount_in_cents: integer, currency: string, }, tax_amount: { amount_in_cents: integer, currency: string, }, order_amount: { amount_in_cents: integer, currency: string, }, }, }, }); ``` ```javascript checkoutSdk.startCheckout({ checkout_payload: { // "cancel_url":{ // "href": "http://localhost:44300/demo/v2checkout.html" // }, // "complete_url":{ // "href": "http://localhost:44300/demo/v2checkout.html" // }, is_express_checkout: true, order: { intent: "AUTH", reference_id: "543645yg5tg5675686", description: "sezzle-store - #12749253509255", requires_shipping_info: false, items: [ { name: "widget", sku: "sku123456", quantity: 1, price: { amount_in_cents: 1000, currency: "USD", }, }, ], discounts: [ { name: "20% off", amount: { amount_in_cents: 1000, currency: "USD", }, }, ], metadata: { location_id: "123", store_name: "Downtown Minneapolis", store_manager: "Jane Doe", }, shipping_amount: { amount_in_cents: 1000, currency: "USD", }, tax_amount: { amount_in_cents: 1000, currency: "USD", }, order_amount: { amount_in_cents: 10000, currency: "USD", }, }, }, }); ``` The HTTP request information used to redirect the customer in the case of a cancellation The URL used when redirecting a customer The HTTP request information used to redirect the customer upon completion of the session The URL used when redirecting a customer Indicates whether checkout should follow the express checkout protocol . For this implementation, be sure to use `true` The order for this session If your checkout flow requires the user to confirm their checkout on your site after being approved by Sezzle, use “AUTH” as your intent. If you prefer the checkout be captured immediately, use “CAPTURE”. Available options: `AUTH`, `CAPTURE` Your reference ID for this order (must contain only alphanumeric characters, dashes (-), and underscores (\_)) Your description for this order Flag to indicate if you would like us to collect shipping information for this checkout from the customer. If omitted, defaults to false. If `is_express_checkout` is `true` and shipping method is not *In-Store pick-up*, `requires_shipping_info` must be `true`. For In-Store pick-up and standard checkout, use `false` The items being purchased The name of the item The sku identifier The quantity purchased The price object The amount of the item in cents The 3 character currency code as defined by ISO 4217 The discounts applied to this order. Must be included in total The description of the discount A price object The amount of the item in cents The 3 character currency code as defined by ISO 4217 Object for any custom data you want to submit with the checkout. You are not limited to the key-value pairs shown in the example, and you may use any key-value pairs you like Custom metadata field Custom metadata field The shipping fees applied to this order. Must be included in the total The amount of the item in cents The 3 character currency code as defined by ISO 4217 The taxes applied to this order. Must be included in the total The amount of the item in cents The 3 character currency code as defined by ISO 4217 The total amount of the order The amount of the item in cents The 3 character currency code as defined by ISO 4217 Start checkout should be implemented in the checkout `onClick` handler. There are two methods for hosting a checkout. **Use a checkout payload as detailed in the Session Object** * The cancel and complete URLs are not required for `iframe` and `popup` mode. **Use an existing checkout URL** * The `mode` used when configuring the SDK checkout must match the `checkout_mode` when [creating a session](/docs/api/core/sessions/postv2session). * The parent window `origin` must be provided in the cancel and complete urls when the `checkout_mode` is `iframe` or `popup`. **Customer Tokenization** This is not supported in the `onComplete` event. To receive a customer UUID, subscribe to the [customer.tokenized](/docs/api/core/webhooks/postv2webhooks#valid-webhook-events) event. #### Capture Payment Capturing an order is not required if the `CAPTURE` intent was used when creating the checkout. ```javascript checkoutSdk .capturePayment(response.data.order_uuid, { capture_amount: { amount_in_cents: integer, currency: string, }, partial_capture: boolean, }) .then((r) => { console.log(r); }); ``` ```javascript checkoutSdk .capturePayment(response.data.order_uuid, { capture_amount: { amount_in_cents: 10000, currency: "USD", }, partial_capture: false, }) .then((r) => { console.log(r); }); ``` The amount to capture on this order The amount in cents The 3 character currency code as defined by ISO 4217 #### onCalculateAddressRelatedCosts For security purposes, authentication and checkout update must originate from merchant's back-end code. 1. Get authentication token * Call the [authentication](/docs/api/core/authentication/postauthentication) endpoint to obtain a bearer token * You should have already set this up in your back-end for the standard integration * Instead of pointing directly to Sezzle as in the below example, you can re-use your existing function 2. Update the order * Call the Update and Checkout endpoint to update shipping and tax amount * See `Options` tab below for more details ```javascript [expandable] onCalculateAddressRelatedCosts: async function ( shippingAddress, order_uuid ) { // Call authentication endpoint const response = await fetch( yourBackendAuthenticationURL, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ public_key: string, private_key: string, }), } ); const data = await response.json(); const token = data.token; const updateResponse = await fetch( yourBackendUpdateOrderURL, { method: "PATCH", headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}`, }, body: JSON.stringify({ amount_in_cents: integer, currency_code: string, shipping_amount_in_cents: integer, tax_amount_in_cents: string, address_uuid: shippingAddress.uuid, }), } ); const updateStatus = updateResponse.ok; return { ok: updateStatus, }; }, ``` ```javascript [expandable] onCalculateAddressRelatedCosts: async function ( shippingAddress, order_uuid ) { // Call authentication endpoint const response = await fetch( `http://your-backend-endpoint/authentication`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ public_key: "qxorvmr7zbww7yw8vvhlxi8s3uko18q7", private_key: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyaWQiOjEsInNjb3BlIjoibWVyY2hhbnRhcGkiLCJleHAiOjQ2MzM3MTg3MDYsImlzcyI6IlNlenpsZSJ9.Ez4-gbBpb5iTRJ9VCVD97IrjS98v1NalZlL2fHU2KSA", }), } ); const data = await response.json(); const token = data.token; const updateResponse = await fetch( `http://your-backend-endpoint/updateOrder`, { method: "PATCH", headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}`, }, body: JSON.stringify({ amount_in_cents: 11500, currency_code: "USD", shipping_amount_in_cents: 500, tax_amount_in_cents: 1000, address_uuid: shippingAddress.uuid, }), } ); const updateStatus = updateResponse.ok; return { ok: updateStatus, }; }, ``` The total amount in cents The 3 character currency code as defined by ISO 4217 The shipping amount in cents for the order The tax amount in cents for the order The address UUID for the order ##### Response ```json { ok: boolean, error: { code: string } } ``` ```json { ok: false, error: { code: "merchant_unsupported_shipping_address" } } ``` Available options: `merchant_unsupported_shipping_address`, `merchant_error` `merchant_unsupported_shipping_address` indicates that the merchant does not support the shipping address provided. `merchant_error` is generic error returned by the merchant when something goes wrong on their end. # Introduction Source: https://docs.sezzle.com/docs/guides/express/introduction Install the Sezzle Express Checkout button to increase conversion rates and enhance customer satisfaction. Sezzle Express Checkout is currently in Beta and only available to direct integration merchants. Contact your account manager to get early access. ## Shopper Experience Sezzle shoppers can skip the manual entry on the merchant checkout by using the contact info and card details on their Sezzle account. Simply sign in and confirm shipping address, avoiding up to 20 fields. ![Express Overview Shopper Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/guides/express/Group5.png) Shoppers click the Sezzle Express button to visit Sezzle’s checkout page. The shopper signs in to Sezzle and confirms their shipping address. The shopper selects their preferred installment plan. The shopper’s details are sent to the merchant, saving time. The express checkout process minimizes friction by eliminating the need for shoppers to manually enter shipping and payment details, especially for returning Sezzle shoppers with saved information. The prefilled data, enabled by the merchant’s API integration, creates a seamless experience that reduces abandoned carts and boosts sales. ### Compare to Standard Checkout Flow Without the Sezzle checkout button or prefilled information, the checkout process involves multiple steps, which can lead to cart abandonment due to complexity: 1. Add Items to Cart and Proceed to Checkout * Shoppers select their desired products and initiate the checkout process on the merchant’s website 2. Enter Contact Information * Shoppers manually input their name, email, and phone number 3. Enter Shipping Details * Shoppers manually input their address 4. Select Shipping Method * Shoppers manually select their shipping method 5. Select Sezzle as Payment Method * Shoppers choose Sezzle from the available payment options and are redirected to Sezzle’s checkout page 6. Sign In and Complete Purchase * On Sezzle’s site, shoppers sign in or create an account, confirm their payment plan (e.g., 25% upfront, three installments), and finalize the order This multi-step process can deter shoppers, especially those who find entering information tedious or who abandon their carts due to lengthy forms. ## How It Works ![Express Overview Simple Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/guides/express/Group4.png) ## FAQs Currently, you must be on a direct integration to use Sezzle Express Checkout. In the near future, we'll add integrations for popular ecommerce platforms. Currently, you must provide a default shipping method. In the near future, we'll add functionality that allows your shoppers to select their preferred shipping method. # Quick Guide Source: https://docs.sezzle.com/docs/guides/express/quick-guide Express Checkout option is only available for direct integration merchants. ## Installation 1. Import Library * Copy this script to the `` of your site code ```html ``` 2. Add Configuration * Configure [Express Checkout](./express-checkout#configuration-options) ```diff const checkoutSdk = new ExpressCheckout({ mode: "popup", + publicKey: `${yourSezzleAPIKey}`, apiMode: "live", apiVersion: "v2", }); ``` * Configure the [event listeners](./express-checkout#configuration-options) ```diff [expandable] checkoutSdk.init({ onClick: function () { event.preventDefault(); checkoutSdk.startCheckout({ checkout_payload: { is_express_checkout: true, order: { + intent: "CAPTURE", + reference_id: yourReferenceID, + description: yourDescription, requires_shipping_info: true, items: [ { + name: yourProductName, + sku: yourProductSKU, + quantity: yourQuantity, price: { + amount_in_cents: yourProductPrice, + currency: "USD", }, }, ], discounts: [ { + name: yourDiscountName, amount: { + amount_in_cents: yourDiscount, + currency: "USD", }, }, ], shipping_amount: { + amount_in_cents: yourShippingAmount, + currency: "USD", }, tax_amount: { + amount_in_cents: yourTaxAmount, + currency: "USD", }, order_amount: { + amount_in_cents: yourOrderAmount, + currency: "USD", }, }, }, }); }, onComplete: function (response) { alert("Completed transaction. Capture started."); checkoutSdk .capturePayment(response.data.order_uuid, { capture_amount: { + amount_in_cents: yourCaptureAmount, + currency: "USD", }, partial_capture: false, }) .then((r) => { console.log(r); }); }, onCancel: function () { alert("Transaction cancelled."); }, onFailure: function () { alert("Transaction failed."); }, onCalculateAddressRelatedCosts: async function ( shippingAddress, order_uuid ) { // Call authentication endpoint const response = await fetch( + `$(yourBackendAuthenticationURL)`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ + public_key: yourSezzlePublicKey, + private_key: yourSezzlePrivateKey, }), } ); const data = await response.json(); const token = data.token; const updateResponse = await fetch( + `$(yourBackendUpdateOrderURL)`, { method: "PATCH", headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}`, }, body: JSON.stringify({ + amount_in_cents: yourAmount, + currency_code: "USD", + shipping_amount_in_cents: yourShippingAmount, + tax_amount_in_cents: yourTaxAmount, address_uuid: shippingAddress.uuid, }), } ); const updateStatus = updateResponse.ok; return { ok: updateStatus, }; }, }); ``` 3. Install Button * Copy this placeholder element to where you wish the button to render on the page * [See here for customization options](./express-checkout#sezzle-button-configuration) ```html
``` * Load the button using Javascript ```javascript await checkoutSdk.renderSezzleButton("sezzle-smart-button-container"); ``` # In-Store Source: https://docs.sezzle.com/docs/guides/in-store The Sezzle POS Checkout API allows merchants to send a Sezzle Checkout link to customers via text or email and receive real-time payment updates on their POS system upon checkout completion. ## Customer Experience This is what the customer sees if they click the text message or email link. The shopper enters their phone number and OTP. The shopper adds a payment method. The shopper selects their preferred installment plan. The shopper completes their Sezzle order. ### Direct API Checkout 1. Merchant creates a [session](/docs/api/core/sessions/postv2session) * Set order `intent` to `AUTH` * The customer checkout is texted or emailed as set in `send_checkout_url` 2. Sezzle returns order uuid and checkout URL 3. Customer receives Sezzle URL via text or email to check out 4. Customer completes the Sezzle checkout 5. Merchant receives order-complete notification * You can either [get order details](/docs/api/core/orders/getv2order) or subscribe to [webhooks](/docs/api/core/webhooks/postv2webhooks) 6. (optional) Update the [order reference](https://docs.sezzle.com/docs/guides/virtual/automated#set-order-reference-id) 7. [Capture](/docs/api/core/orders/postv2capturebyorder) the payment 8. (optional) Expire the checkout manually * [Delete the checkout](/docs/api/core/orders/deletev2deletecheckoutbyorder) if the customer has not completed the checkout and the merchant has canceled the order 9. (optional) [Refund](/docs/api/core/orders/postv2refundbyorder) the order # Introduction Source: https://docs.sezzle.com/docs/guides/sezzle/introduction Sezzle provides an effortless way to integrate flexible payment options into your checkout process. With a design focused on quick and efficient setup, our solution allows you to get started faster than you might anticipate. ## Get Started with Sezzle Select the integration option that works best for your store. Utilize our APIs to integrate Sezzle into your custom online store. Integrations for Shopify, Magento 2, Wix, WooCommerce, and more. * Accept Sezzle payments as credit card transactions. Empower your customers to pay with Sezzle at your physical store location. ## Conversion Boosters Increase sales with these additional Sezzle products. Showcase Sezzle as a payment method on product pages. Increase conversion rates and enhance customer satisfaction. ## Additional Resources These will speed up your Sezzle integration. Accept web and in-app payments through our expansive API integration. Contact our Merchant Support team to get help with integrating Sezzle. ## How Sezzle Works The shopper adds your product to their cart. The shopper selects "Buy Now, Pay Later with Sezzle" at checkout. The shopper selects their preferred installment plan. The shopper completes their Sezzle order. ## Popular Integrations ![Screenshot2025 05 12at10 46 33AM Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/guides/sezzle/Screenshot2025-05-12at10.46.33AM.png) ![Screenshot2025 05 12at10 46 40AM Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/guides/sezzle/Screenshot2025-05-12at10.46.40AM.png) ![Screenshot2025 05 12at10 46 43AM Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/guides/sezzle/Screenshot2025-05-12at10.46.43AM.png) ![Screenshot2025 05 12at10 46 48AM Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/guides/sezzle/Screenshot2025-05-12at10.46.48AM.png) ![Screenshot2025 05 12at10 50 10AM Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/guides/sezzle/Screenshot2025-05-12at10.50.10AM.png) ![Screenshot2025 05 12at10 50 16AM Pn](https://mintlify.s3.us-west-1.amazonaws.com/sezzle/images/docs/guides/sezzle/Screenshot2025-05-12at10.50.16AM.png) # Using Virtual Card SDK Source: https://docs.sezzle.com/docs/guides/virtual/automated This is the fastest way to get started using the virtual card offering from Sezzle. A virtual card checkout implements the Card Session API to provide an easy to use, in-context solution for issuing and using a Sezzle virtual card as payment. The Sezzle non-production environment does not provide a way to test the payment processing using your provider. Virtual Card Checkout in an iframe or pop-up window. Enable plain card details through message event or tokenization. Handle payment success, failure, or cancel with your virtual card orders. Render the Sezzle checkout button on your store. ## Include SDK code Include the following script in the `` section of the page. ```html ``` ## Checkout Configuration The first requirement to get started with the Virtual Card SDK is to configure a new Checkout object. ### Configuration Options ```javascript const checkoutSdk = new Checkout({ mode: string, publicKey: string, apiMode: string, isVirtualCard: boolean, }); ``` ```javascript const checkoutSdk = new Checkout({ mode: "popup", publicKey: "qxorvmr7zbww7yw8vvhlxi8s3uko18q7", apiMode: "sandbox", isVirtualCard: true, }); ``` Available options: `popup`, `iframe`, `redirect` **popup** mode will work out-of-the-box. No additional configuration is required to use **popup**. Sezzle currently recommends **popup** mode. **iframe** mode will not work properly without first contacting Sezzle. For security reasons, Sezzle must enable **iframe** for your domain(s). To have it enabled, please submit a request with your Sezzle Merchant UUID and a list of domains to be allowed per environment (production and sandbox). For example, [*please enable uat1.mysite.com, uat2.mysite.com in sandbox and www.mysite.com, mysite.com in production*](http://www.mysite.com). The integration for **popup** and **iframe** are identical, aside from the mode. Using **popup** mode will expedite your development. Upon completing the integration, if **iframe** is a requirement, then contact Sezzle to enable your domain(s) and switch the mode to **iframe**. Used when creating a checkout or capturing payment. Find your API keys at [https://dashboard.sezzle.com/merchant/settings/apikeys](https://dashboard.sezzle.com/merchant/settings/apikeys) Environment in which the checkout is to be completed Available options: `live`, `sandbox` Use `true` to enable this feature ## Sezzle Button ### Sezzle Button Configuration Create a placeholder element for the Sezzle Button to be rendered on the page(s). ```html
```
```html
```
Text to appear inside the button. Use `%%logo%%` inside the text to display the Sezzle image Available options: `square`, `semi-rounded` Custom classes to be applied Negative space between top of content and edge of button Negative space between bottom of content and edge of button Negative space between left side of content and edge of button Negative space between right side of content and edge of button Width of the Sezzle logo within the button Position of the Sezzle logo from top. Position of the Sezzle logo from bottom. Position of the Sezzle logo from left. Position of the Sezzle logo from right. Spacing between the templateText letter. Width of the button Height of the button.
### Render the Sezzle Button Requires having the `checkout` object created from above to render the button. Call `renderSezzleButton` passing the `id` of the placeholder element defined in Button Configuration, above. ```javascript checkoutSdk.renderSezzleButton("sezzle-smart-button-container"); ``` ## Initialize the Checkout ### Event Handlers The SDK requires the following event handlers that can be used to extend features in your application. ```javascript checkoutSdk.init({ onClick: function () { event.preventDefault(); checkoutSdk.startCheckout({...}); }, onComplete: function (event) { console.log(event.data); }, onCancel: function () { console.log("Checkout cancelled."); }, onFailure: function () { console.log("Checkout failed."); }, }); ``` ```javascript [expandable] checkoutSdk.init({ onClick: function () { event.preventDefault(); checkoutSdk.startCheckout({ checkout_payload: { amount_in_cents: 1000, currency: "USD", merchant_reference_id: "merchant-checkout-id-max-255", customer: { email: "test@test.com", first_name: "John", last_name: "Doe", phone: "0987654321", billing_address_street1: "3432 Terry Lane", billing_address_street2: "12", billing_address_city: "Katy", billing_address_state: "TX", billing_address_postal_code: "77449", billing_address_country_code: "US", }, items: [ { name: "Blue tee", sku: "sku123456", quantity: 1, price: { amount_in_cents: 1000, currency: "USD", }, }, ], }, }); }, onComplete: function (event) { console.log(event.data); }, onCancel: function () { console.log("Checkout cancelled."); }, onFailure: function () { console.log("Checkout failed."); }, }); ``` Sezzle Button is clicked by the user. See [Checkout Initialization](#checkout-initialization) section for payload options. Sezzle payment is successfully completed. A successfully completed Sezzle checkout will trigger an event to the `onComplete` handler. The event should include a data object with data relevant to the start checkout input parameter. Sezzle payment is cancelled. If the user exits the Sezzle checkout for any reason, the `onCancel` handler will be executed. Sezzle payment has failed. If there is an error loading the Sezzle checkout page, the `onFailure` handler will be executed. ### Checkout Initialization ```javascript [expandable] checkoutSdk.startCheckout({ checkout_payload: { amount_in_cents: integer, currency: string, merchant_reference_id: string, customer: { email: string, first_name: string, last_name: string, phone: string, billing_address_street1: string, billing_address_street2: string, billing_address_city: string, billing_address_state: string, billing_address_postal_code: string, billing_address_country_code: string, }, items: [ { name: string, sku: string, quantity: integer, price: { amount_in_cents: integer, currency: string, }, }, ], }, }); ``` ```javascript [expandable] checkoutSdk.startCheckout({ checkout_payload: { amount_in_cents: 1000, currency: "USD", merchant_reference_id: "merchant-checkout-id-max-255", customer: { email: "test@test.com", first_name: "John", last_name: "Doe", phone: "0987654321", billing_address_street1: "3432 Terry Lane", billing_address_street2: "12", billing_address_city: "Katy", billing_address_state: "TX", billing_address_postal_code: "77449", billing_address_country_code: "US", }, items: [ { name: "Blue tee", sku: "sku123456", quantity: 1, price: { amount_in_cents: 1000, currency: "USD", }, }, ], }, }); ``` `checkout_payload` is optional but providing as much information as possible will improve customer experience. The amount of the item in cents The 3 character currency code as defined by ISO 4217 Typically a checkout or cart id, currently used for tracking only (must contain only alphanumeric characters, dashes (-), and underscores (\_)) Used only for troubleshooting. The Reference ID that shows in the Merchant Dashboard can be set using [Set Order Reference ID](#set-order-reference-id) The customer for the order The customer's email address The customer's first name The customer's last name The customer's phone number 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 items being purchased The name of the item The sku identifier The quantity purchased The price object The amount of the item in cents The 3 character currency code as defined by ISO 4217 ### `onComplete` with card data The `event.data` will contain a fully formed payload containing the customers payment method. This information is not the payment method used to pay Sezzle but one that can be used through your payment gateway (Cybersource, Stripe, Braintree, etc). #### `event.data` response ```json [expandable] { "session_id": string, "card": { "firstName": string, "lastName": string, "pan": string, "cvv": string, "expiryMonth": string, "expiryYear": string }, "holder": { "email": string, "phone": string, "firstName": string, "lastName": string, "address1": string, "address2": string, "city": string, "state": string, "country": string, "postalCode": string } } ``` ```json [expandable] { "session_id": "123", "card": { "firstName": "John", "lastName": "Doe", "pan": "1234", "cvv": "123", "expiryMonth": "02", "expiryYear": "28" }, "holder": { "email": "john.doe@example.com", "phone": "6125551234", "firstName": "John", "lastName": "Doe", "address1": "123 W Lake St", "address2": "Unit 104", "city": "Minneapolis", "state": "MN", "country": "US", "postalCode": "55408" } } ``` The first name on the card The last name on the card The security code on back of the card The expiration month on the card The expiration year on the card The customer's email address The customer's phone number The customer\`s first name The customer\`s last name The street and number of the address The apt or unit The city The 2 character state code The 2 character country code The postal delivery code ### `onComplete` with tokenization Tokenization is a feature developed for merchants who do not want the card information sent directly through the message event. Instead the payload to `onComplete` will contain a card token string. #### Checkout initialization ```diff checkout.init({ onClick: function () { event.preventDefault(); checkout.startCheckout({ checkout_payload: { ... + "card_response_format":"token" } }); }, onComplete: function (event) { console.log(event.data) }, onCancel: function() { console.log("checkout canceled"); }, onFailure: function() { console.log("checkout failed"); } }) ``` #### `event.data` response ```json { "card": { "token": string } } ``` ```json { "card": { "token": "abc12345" } } ``` #### Get card data The virtual card data can be obtained using the token above using the [Virtual Card Data](/docs/api/core/sessions/virtual/carddatabytoken) method. ## Set Order Reference ID In many cases, the merchant order ID will not be generated until after the checkout is completed and an order is created. Call `setOrderReferenceID` to set the Sezzle Order Reference ID with the merchant order ID after the virtual card transaction has been successfully completed. ### Using SDK ```javascript checkoutSdk.setOrderReferenceID({ session_id: string, order_id: string, }); ``` ```javascript checkout.setOrderReferenceID({ session_id: "example-session-id", order_id: "merchant-order-id", }); ``` ### Using API The [Update Card Session](/docs/api/core/sessions/virtual/setorderid) API endpoint exists where you are able to update the Order ID based. # Introduction Source: https://docs.sezzle.com/docs/guides/virtual/introduction * Sezzle Virtual Card allows merchants to: * Accept Sezzle payments as credit card transactions. * Seamlessly integrate with existing credit card forms at checkout. * For API-related questions, contact the Sezzle team via the [Merchant Help Request](https://merchant-help.sezzle.com/hc/en-us/requests/new) form. * An approved Sezzle account is required to begin integration; [sign up](https://dashboard.sezzle.com/merchant/signup) if you don’t have one. * Endpoints in this guide require an [authentication](/docs/api/core/authentication/postauthentication) token. You can test your integration with Sezzle using [Sezzle sandbox test environment](/docs/api/environments). This product is currently only available in the United States. Support for Canada coming soon. The shopper selects "Make a purchase request" on the Virtual Card tab. The shopper enters the amount they plan to spend. The shopper reads the loan terms and continues if they agree. The shopper uses the Virtual card at your checkout or terminal. # Manual Integration Source: https://docs.sezzle.com/docs/guides/virtual/manual If the [Virtual Card SDK](./automated) is not a viable option, the manual integration will guide you through the steps to complete a virtual card session in your checkout. ## Overview 1. Create a [virtual card session](/docs/api/core/sessions/virtual/postv2sessioncard) 2. Add a window event listener with type `message` to the checkout page 3. Open the card session `dashboard_url` using the mode provided in the create card session request 4. Sezzle will post a message to the listener when the user has completed the card session 5. Verify message `event.data` exists 6. Verify `event.data.szl_source` `=` `v_card` 7. Verify `event.data.card` and `event.data.holder` both exist * If they exist * Use card and holder data to submit the order by credit card * If they don't exist * The user did not provide virtual card data ## Example Javascript ```javascript [expandable] window.addEventListener("message", function () { var data = event.data || Object.create(null); if (data.szl_source !== "v_card") { console.log("invalid source"); return; } var card = data.card; var holder = data.holder; if (!card && !holder) { console.log("failed virtual card session"); return; } console.log( "card data:", card.firstName, card.lastName, card.pan, card.cvv, card.expiryMonth, card.expiryYear ); console.log( "holder data:", holder.email, holder.phone, holder.firstName, holder.lastName, holder.address1, holder.address2, holder.city, holder.state, holder.country, holder.postalCode ); }); ``` # Widget SDK Source: https://docs.sezzle.com/docs/guides/widgets/sdk ## Purpose Boost conversions and increase average order value by showcasing Sezzle’s financing options to shoppers as they browse your site. ## Overview The Sezzle promotional messaging widget displays available financing options on product and cart pages, encouraging purchases. Follow the installation instructions below to add the widget to your website. ## Installation * **One-Click Installation**: Many leading platforms offer one-click installation with Sezzle. [Check for compatibility with your platform](https://docs.sezzle.com/docs/plugins/). * **Manual Installation**: If one-click installation is unavailable or incompatible with your theme, refer to the manual installation guide or contact [merchantsupport@sezzle.com](mailto:merchantsupport@sezzle.com) for assistance. ## Customization Sezzle provides extensive configuration options to tailor the widget to your site’s needs. Our engineering team is available to ensure seamless integration with your website’s design and functionality. ### HTML required ```html ``` Replace `{merchant_id}` with your 36-character value from your [Merchant Dashboard](https://dashboard.sezzle.com/merchant/settings/business). ## Merchant Configured Configuration is required prior to invoking the price widget script. ## `document.sezzleConfig` Options ```html [expandable] ``` ```html [expandable] ``` Allows multiple configurations for one store to suit different page types, layouts, or applications. View all available options for customization. ID, class, or path to the element in the webpage where the product price text value will be detected.\ To indicate a path, subpaths are separated by '/', IDs are preceded by '#', classes by '.', and tag names are suffixed with index (`tagName-Index`). Indexes are zero-based. e.g. '#ProductSection/.product-price/SPAN-1' would target the 2nd 'SPAN' element contained within elements that contain the 'product-price' class which are contained within the element with an ID of 'ProductSection'. Path from `targetXPath` to the element after which the Sezzle widget should be rendered.\ Use '.' for sibling placement, '../' to move up to parents, and tag-index selectors to move down. Same syntax as `targetXPath`. e.g. '../../BUTTON-0' would go to the grandparent element of the targetXPath and place the widget after the first button found within that container. Specific word appearing in the URL of pages where the widget config should apply. Typical values are 'product' or 'cart'. Updates the logo color to coordinate with different background colors. If not specified, the widget will attempt to detect the background color and apply a contrasting logo. Available options: `dark`, `light`, `black-flat`, `white-flat`. Custom styling to apply to the Sezzle widget container. Accepts CSS in JSON format. Keys must use camelCase, be wrapped in quotes, and separated by commas. Key should be the CSS property you wish to set, in camelCase, value should be type string Custom styling to apply to the Sezzle text within the widget. Accepts CSS in JSON format. Keys must use camelCase, be wrapped in quotes, and separated by commas. Key should be the CSS property you wish to set, in camelCase, value should be type string Custom styling to apply to the Sezzle logo within the widget. Accepts CSS in JSON format. Keys must use camelCase, be wrapped in quotes, and separated by commas. Key should be the CSS property you wish to set, in camelCase, value should be type string The path from the targetXPath to the observable element Function receives two parameters. The first is the related element per `relatedPath`, the second is the widget that corresponds to this `targetXPath` element. Write a custom function to check condition on relatedPath, then perform an action on widget. Direct child elements of `targetXPath` to be disregarded when detecting the price. Useful for handling variations between sale and regular-priced items. Text strings within `targetXPath` to be disregarded when detecting the price and rendering the widget. XPath of elements that should be hidden when Sezzle's widget is showing.\ Despite the name, this config accepts an array of XPaths. e.g. \["#viabill-pricetag",".afterpay-paragraph","QUADPAYWIDGET-0"] Alignment of the widget relative to the parent element. Available options: `left`, `center`, `right`, `auto` Screen width in pixels below which the alignment switches to `alignmentSwitchType`. Common breakpoint: 768px (for handheld vs desktop). Alignment of the widget to apply when viewport width is narrower than `alignmentSwitchMinWidth`. Available options: `left`, `center`, `right`, `auto` Afterpay's logo is appended to widget content. When clicked, the competitor's modal will display. Klarna's logo is appended to widget content. When clicked, the competitor's modal will display. Minimum price in cents for which Sezzle can be selected at checkout. If the price at `targetXPath` is lower than this number, the widget will render with a note stating the minimum eligible price required. This configuration does not prevent a customer from checking out with Sezzle below this price. For more information on setting a gateway minimum, contact your Merchant Success representative or use the Contact Us section of the Sezzle Merchant Dashboard. Maximum price in cents for which the widget should be rendered. If the price at `targetXPath` is higher than this number, the widget will not render on the page. Language in which the widget text should be rendered. If the specified language is not supported, the translation will default to English. Available options: `left`, `center`, `right`, `auto` Can attach event listeners to DOM elements and re-initialize the widget. The id or class of the element to observe The event type for which to observe, upon which to re-render the widget #### Simple Example ```html ``` ```html ``` ## Rendering the Widgets After building the config, it is time to upload the widgets to your webpages! The SDK needs to be called in the HTML of the webpage for the widgets to be rendered. Place the config and the widget script at the bottom of the code file for the HTML page, and you should be all set! A pre-populated snippet should be provided in your Sezzle Merchant Dashboard Setup Checklist. When using this snippet to add the widget script to your site, you must replace `{merchant_id}` with the 36-character Sezzle Merchant ID found in the [Business Settings of your Sezzle Merchant Dashboard](https://dashboard.sezzle.com/merchant/settings/business) for the applicable store. Please do not re-use IDs across multiple URLs. The script with the applicable merchant ID **must** be included *after* `document.sezzleConfig` is defined. ### HTML Needed ```html ``` Replace `{merchant_id}` with your 36-character value from your Merchant Dashboard. # Static Widget Source: https://docs.sezzle.com/docs/guides/widgets/static The Static Widget enables merchants to integrate the Sezzle widget into their website without direct communication with Sezzle’s servers. All widget code, custom configurations, images, and stylesheets are hosted locally within the merchant’s store theme. This approach offers: * Faster Load Times * Local hosting reduces dependency on external servers. * Greater Control * Merchants have full authority over the widget’s appearance and behavior, as the Sezzle team cannot modify it. This local control means merchants are responsible for any updates or changes to the widget. ## NPM Implementation Using npm: `npm install @sezzle/sezzle-static-widget@latest` Within your product page, add the following code snippet where you want the widget to render, updating the path to node\_modules for your file structure: ```html ``` Use the Configuration options below to customize the widget appearance as desired. ## HTML Implementation Implementation varies greatly by platform, theme, etc. Below is a general overview of the process. The code snippets below are samples and may need to be modified to fit your site. For Shopify merchants, please proceed to the next section. 1. Create a new Javascript file within your site's code where appropriate 2. Copy and paste [this minified code](https://github.com/sezzle/static-widgets/blob/production/dist/bundle.js) into the newly created file 3. Import the new file into the page(s) where the Sezzle widget will be added ```html ``` 4. Create a placeholder element where the Sezzle widget should be rendered on the page(s), usually below the price container element ```html
``` 5. Add the following script below the placeholder element, updating the amount value to reflect your price variable which renders the current product price or cart total as applicable ```html ``` 6. Preview your changes to confirm the widget is displaying correctly in each of the following scenarios * Use the Configuration options below to customize the widget appearance as desired: * Regular Price * Sale Price * Variant Selection * Desktop * Mobile ## Shopify Implementation 1. Log into your Shopify store admin 2. Click `Online Store` > `Themes` 3. Next to the theme you wish to edit, click `Actions`, then select `Edit Code` 4. Under the `Assets` folder, click `Add a new asset` 5. On the `Create a Blank File` tab, name the file `sezzle-static-widget` and select `.js` as the file type, then click `Add Asset` 6. Copy the code from the [repository file](https://github.com/sezzle/static-widgets/blob/production/dist/bundle.js) and paste it into this new file, then click `Save` 7. Add the following lines of code wherever the widget should render on the product page within `templates/product.liquid` or `sections/product-template.liquid` as applicable ```html
{{ 'sezzle-static-widget.js' | asset_url | script_tag }} ``` 8. Add the following lines of code wherever the widget should render on the cart page within `templates/cart.liquid` or `sections/cart-template.liquid` as applicable ```html
{{ 'sezzle-static-widget.js' | asset_url | script_tag }} ``` # Customizing the Configuration Once the widget is rendering, additional configurations can be added to the AwesomeSezzle to change the appearance. Below is an example featuring all the options. However, amount is the only required value. ```html [expandable] ``` ```html ``` The target price amount, in dollar format.\ Provide the product price variable as a template-literal.\ Shopify Liquid Example: `'{{ product.selected_or_first_available_variant.price | money }}'` Provide the ID name or array of ID names that correspond to the widget placeholder elements where the widget should be rendered. Updates the logo color to coordinate and contrast with different background colors of websites. If `theme` is not specified, the widget will attempt to detect the background color and apply the appropriate contrasting logo. Use "light" or "black-flat" for light backgrounds, and "dark" or "white-flat" for dark backgrounds. Available options: `dark`, `light`, `black-flat`, `white-flat` Maximum width of the widget element in pixels. Set to 200 to render the widget nicely on 2 lines, or 120 for 3 lines. Amount of space above the widget in pixels. Amount of space below the widget in pixels. Amount of space left of the widget in pixels. Amount of space right of the widget in pixels. Alignment of the widget relative to the parent element. Available options: `left`,`center`, `right`, `auto`. Screen width in pixels below which the alignment switches to `alignmentSwitchType` instead of `alignment`. The most common breakpoint is *768* (handheld vs desktop). `alignmentSwitchMinWidth` is typically only necessary when alignment is not set to `auto`. Alignment of the widget relative to the parent element to be applied when the viewport width is narrower than `alignmentSwitchMinWidth`. Available options: `left`,`center`, `right`, `auto`. Color of the widget text. Accepts all CSS color formats: hex, rgb(), hsl(), etc. Font family of the widget text. Font size of the widget text in pixels. Enter numbers only — do not include units like `px`! Boldness of the widget text. 100 is the lightest, 900 is the boldest. Specifies the page category on which the widget is being rendered. Avaialble options: `product-page`, `product-preview`, `cart`. Sets the CSS value of fixed-height. Ratio at which to scale the Sezzle logo. The space the logo occupies between the widget text and the More Info link/icon is determined by the font size. Custom styling to apply to the Sezzle logo within the widget. The object accepts any CSS styling in JSON format. Keys must be camelCase. Language in which the widget text should be rendered. If the specified language is not supported, the translation will default to English. Available options: `en`, `fr`, `es`, `de`. Allows widget installment price to calculate and format correctly for foreign currencies. Available options: `default`, `comma`. Allows widget to render the correct program details, depending on if the merchant is enrolled through Sezzle North America or Sezzle Europe. Available options: `North America`, `Europe`. ## Methods The following functions are built into the static widget and are ready for use for your widget installation. Simply add the applicable snippet to your webpage code, updating the event listener and variables as necessary. ### `alterPrice(newPrice)` Alters price on widget. Create an event listener after `renderSezzle.init()` that invokes this function where `newPrice` is the new price value of the selected variant. Example: ```javascript document.onchange = function () { var newPrice = "${yourPriceVariableHere}"; renderSezzle.alterPrice(newPrice); }; ``` ### `renderModalByfunction()` Opens the Sezzle modal by a function. Create an event listener that invokes this function if the event location is other than the info icon. ```javascript var clickElement = document.querySelector("#yourClickableElementIdHere"); clickElement.addEventListener("click", function () { renderSezzle.renderModalByfunction(); }); ``` ### `isMobileBrowser()` Returns true on mobile browser. Use this event to show or hide the widget in different page locations based on device type. ```javascript document.onreadystatechange = function () { if (renderSezzle.isMobileBrowser()) { document.getElementById("sezzle-widget-mobile").style.display = "block"; document.getElementById("sezzle-widget").style.display = "none"; } else { document.getElementById("sezzle-widget").style.display = "block"; document.getElementById("sezzle-widget-mobile").style.display = "none"; } }; ``` ### `getElementToRender()` Returns Element where the widget will be rendered. Create an event listener that invokes this function if the widget should appear when the event occurs. ```javascript document.body.insertBefore( renderSezzle.getElementToRender(), document.getElementById("price").nextElementSibling ); ``` # Before You Begin Source: https://docs.sezzle.com/docs/plugins/before-you-begin 1. You should have a Sezzle merchant account * Please visit our [signup page](https://dashboard.sezzle.com/merchant/signup) if you don't have an account 2. Make sure you know the following Sezzle details for your account * [Merchant ID](https://dashboard.sezzle.com/merchant/settings/business) * [Public API Key](https://dashboard.sezzle.com/merchant/settings/apikeys) * [Private API Key](https://dashboard.sezzle.com/merchant/settings/apikeys) 3. Familiarize yourself with the [transaction flow](https://docs.sezzle.com/docs/guides/direct/introduction) when buying with Sezzle # BigCommerce Source: https://docs.sezzle.com/docs/plugins/big-commerce This guide explains how to add Sezzle as a payment option on your BigCommerce website, enabling customers to use Sezzle at checkout. This integration is only available with [BigCommerce's Optimized One Page Checkout](https://support.bigcommerce.com/s/article/Optimized-Single-Page-Checkout?language=en_US).