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
Place the element snippet from the Template tab where you wish the Sezzle Button to be rendered on the page, then update the Options attributes as needed.- Template
- Example
- Options
Render the Sezzle Button
Add the following function to render the button when it is appropriate, such as when payment methods section loads, or when Sezzle is selected as a payment method. The parameter corresponds to the element created in the previous step.Initialize the Checkout
Event Handlers
The SDK uses these event handlers to tell your site what’s happening in the checkout. Implement each one to react to shopper actions like completing, cancelling, or running into an error.- 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
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.
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.
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