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.
Sezzle Button
Render the Sezzle checkout button on your store.
Include SDK code
Include the following script in the<head> section of the page.
Checkout Configuration
The first requirement to get started with the Virtual Card SDK is to configure a new Checkout object.Configuration Options
- Template
- Example
- Options
Sezzle Button
Sezzle Button Configuration
Create a placeholder element for the Sezzle Button to be rendered on the page(s).- Template
- Example
- Options
Render the Sezzle Button
Requires having thecheckout object created from above to render the button. Call renderSezzleButton passing the id of the placeholder element defined in Button Configuration, above.
Initialize the Checkout
Event Handlers
The SDK requires the following event handlers that can be used to extend features in your application.- Template
- Example
- Options
Checkout Initialization
- Template
- Example
- Options
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
- Template
- Example
- Options
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
event.data response
- Template
- Example
- Options
Get card data
The virtual card data can be obtained using the token above using the Virtual Card Data 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. CallsetOrderReferenceID to set the Sezzle Order Reference ID with the merchant order ID after the virtual card transaction has been successfully completed.
Using SDK
- Template
- Example
- Options