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.
The origin domain needs to be allowlisted by Sezzle for Virtual Card SDK to function. Please contact your Account Manager and they can do this for you.
Checkouts
Virtual Card Checkout in an iframe or pop-up window.
Card Details
Enable plain card details through message event or tokenization.
Payments
Handle payment success, failure, or cancel with your virtual card orders.
If you use iframe mode, add *.sezzle.com to your site’s Content Security Policy (CSP) allowlist so the Sezzle checkout iframe can load.
popup mode will work out-of-the-box, and Sezzle recommends it for most browser-based SDK integrations.
If your checkout runs inside a webview or embedded browser where popups may be blocked, use iframe mode instead. 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.
redirect mode is also supported, but it is generally less useful with the SDK because the SDK’s main value is handling the in-context checkout experience and window messaging between your site and Sezzle.
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.
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.
This response format delivers the full card number (PAN) and CVV directly to your frontend JavaScript. If your systems do not already handle raw cardholder data, this may expand your PCI DSS compliance scope. For a more secure alternative, see onComplete with tokenization, which keeps card data out of the browser and limits handling to your server.
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).
Recommended for most merchants. Tokenization keeps card data out of your browser and reduces your PCI DSS compliance scope. Card data is retrieved server-side only.
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, which your server can exchange for card data using the Virtual Card Data API. The token is single-use and expires after 24 hours.
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.