Magento 2

Magento 2

This guide describes how to integrate Sezzle into your Magento 2 website so that you can provide Sezzle as a payment option for your customers.

Sezzle's Magento 2 extension is certified in the marketplace and can also be downloaded from github.

After integrating Sezzle, your site will:

  1. Offer Sezzle as a payment option on the checkout page.
  2. Refund Sezzle payments from your Magento 2 order management system.
  3. Display Sezzle promotional messaging.
  4. Authorize and capture payments.
  5. Offer instant and delayed capture.

Integration Steps Overview

  1. Install and configure the Sezzle Magento 2 extension
  2. Test your integration
  3. (Optional) Sandbox Testing

Before You Begin

  1. You should have a Sezzle merchant account.
  1. Make sure you have the following Sezzle details handy.

US/CA

EU

And familiarize yourself with the transaction flow when buying with Sezzle.

Install the Sezzle Magento 2 Extension

In the following section, [magento] refers to your Magento 2 root directory.

Using the Composer

Go to the Magento 2 installation directory, then run the below commands:

  1. composer require sezzle/sezzlepay
  2. php bin/magento setup:upgrade
  3. php bin/magento setup:di:compile
  4. php bin/magento setup:static-content:deploy
  5. php bin/magento cache:clean

Manual Method

  1. Download the .zip file from Sezzle's github repository.
  2. Unzip the file
  3. Navigate to Magento [Magento]/app/code/ using SFTP or SSH.
  4. Copy Sezzle directory from unzipped folder to [Magento]/app/code/.
  5. Open a terminal window and run the following command to enable Sezzle:
  • php bin/magento module:enable Sezzle_Sezzlepay
  1. Run the Magento setup upgrade:
  • php bin/magento setup:upgrade
  1. Run the Magento Dependencies Injection Compile:
  • php bin/`magento` setup:di:compile
  1. Run the Magento Static Content deployment:
  • php bin/magento setup:static-content:deploy
  1. Log in to Magento Admin and navigate to System > Cache Management.
  2. Flush the cache storage by selecting Flush Cache Storage.

You can now directly navigate from the Configuration Page to get signed up for Sezzle. To do so, you need to click on Register for Sezzle which will redirect you to the Sezzle Merchant Signup Page. If you have the details already, you can simply click on I've already set up Sezzle, I want to edit my settings to move ahead.

  1. In your Magento 2 [Magento]/app/code/ directory, create a directory named Sezzle.
  2. Inside the new Sezzle directory, create a directory named Sezzlepay.
  3. Inside the new Sezzlepay directory, extract the files from this repository.
  4. Open the command line and run these commands:
  • php bin/magento module:enable Sezzle_Sezzlepay
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy
  1. Log in to your Magento 2 admin and go to System/Cache Management.
  2. Flush the cache storage by selecting Flush Cache Storage.

Upgrade the Magento 2 Extension

Using the Composer

  1. Open terminal and navigate to Magento root path.
  2. Execute the following commands in the terminal:
  • composer update sezzle/sezzlepay
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy
  • php bin/magento cache:clean

Configure Sezzle

Payment Configuration

  • In the Magento admin site, navigate to Stores > Configuration > Sales > Payment Methods > Sezzle > Payment Settings
  • Select the Payment Mode: Live, or Sandbox for testing.
  • Enter your Merchant UUID, Public Key and Private Key. These can be found at the Sezzle Merchant Dashboard (US/CA) or Sezzle Merchant Dashboard (EU).
  • Select the Payment Action. Authorize only will only authorize payment and requires that the payment be captured later. Authorize and Capture will perform both in a single step.
  • Set the Merchant Country as per the origin.
  • Set Min Checkout Amount to restrict Sezzle payment method below that amount.
  • Set Payment from Applicable Countries to Specific Countries.
  • Set Payment from Specific Countries to United States or Canada as Sezzle is currently available for US and Canada only.
  • Select Enable Customer Tokenization. Yes prompts the customer to allow their account to be tokenized. See Customer tokenization
  • Save the configuration and clear the cache.

In-Context Configuration

  • Set Enable In-Context Solution to Yes to enable In-Context Checkout.
  • Set In-Context Checkout Mode to IFrame or PopUp to select how Sezzle Checkout is hosted.

Settlement Report Configuration

  • Set Enable Settlement Reports to Yes to enable the Settlement Reports Dashboard.
  • Set Range to a value based on which you want to fetch the Settlement Reports.
  • Set Enable Automatic Syncing to fetch the Settlement Reports asynchronously. (Note that this requires cron to be enabled.)
  • Set Schedule and Time of Day for the automatic sync to run.

Widget Configuration

  • Set Enable Static Widget Module to Yes to load the Sezzle Widget from your server, or No to load it from the Sezzle server.
  • Set Enable Widget in PDP to Yes when adding the widget script in the Product Display Page, helping to enable the Sezzle Widget Modal in PDP.
  • Set Enable Widget in Cart Page to Yes when adding the widget script in the Cart Page, helping to enable Sezzle Widget Modal in the Cart Page.
  • Save the configuration and clear the cache. Make sure to add <div id="sezzle-widget"/> after the price element in the PDP and Cart theme files once you have enabled the Static Widget module.

Developer Configuration

  • Enable the log tracker to trace the Sezzle checkout process.
  • Set Send Logs to Sezzle to Yes to send the logs to Sezzle on a periodic basic. (Note that this requires cron to be enabled.)
  • You may download the latest logs by clicking on Sezzle Log.
  • Save the configuration and clear the cache.

Your store is now ready to accept payments through Sezzle.

Frontend Functionality

  • When you have correctly set up Sezzle, you will see Sezzle as a payment method in the checkout page.
  • Select Sezzle and continue.
  • Click Continue to Sezzle or Place Order to be redirected to the Sezzle Checkout to complete the checkout. If your account is tokenized, skip the next two steps, you will not be redirected to Sezzle.
  • [Optional] To tokenize your account in the Sezzle checkout, check the box Approve {Store Name} to process payments from your Sezzle account for future transactions. You may revoke this authorization at any time in your Sezzle Dashboard.
  • Click Complete Order to complete your purchase.
  • On successful order placement, you will be redirected to the order confirmation page.

Capture Payment

  • If Payment Action is set to Authorize and Capture, capture will be performed instantly from the extension after order is created and validated in Magento.
  • If Payment Action is set to Authorize, you will need to capture the payment manually from the Magento admin using the following steps:
  • Go the order and click on Invoice.
  • Verify your input in the Create Invoice page and click on Save to create the invoice.
  • This will automatically capture the payment in Sezzle.

Refund Payment

  • Go to Sales > Orders in the Magento admin.
  • Select the order for which you want to refund the payment.
  • Click on Credit Memo and verify your input in the Create Credit Memo page.
  • Save it to initiate the refund in Sezzle.
  • Check the Order Status in the Sezzle Merchant Dashboard. Refunded indicates that payment has been fully refunded while Partially Refunded indicates that the payment has been partially refunded.

Release Payment

  • Go to Sales > Orders in the Magento admin.
  • Select the order for which you want to release the payment.
  • Click on Void and confirm your action.
  • Check the Order Status in Sezzle Merchant Dashboard. Deleted due to checkout not being captured before expiration indicates that the payment has been fully released. Magento does not support partial releases.

Order Verification in Magento Admin

  • Log in to Magento admin, navigate to Sales > Orders, and select the order to verify.
  • If Order Status is Processing and Total Paid equals Grand Total, then payment was successfully captured by Sezzle.
  • If Order Status is Pending and Total Paid does not equal Grand Total, then payment is authorized but yet not captured.
  • If Order Status is Closed, then payment has been refunded.
  • If Order Status is Canceled, then payment has been released.

Order Verification in Sezzle Merchant Dashboard

  • Log in to Sezzle Merchant Dashboard, navigate to Orders, and select the order to veriy.
  • Approved status indicates that payment was successfully captured by Sezzle.
  • Authorized, uncaptured indicates that payment was authorized but yet not captured.
  • Refunded status indicates that the payment was refunded.
  • Deleted due to checkout not being captured before expiration status indicates that either the payment was not captured before the authorization expired, or that the payment has been released.

Customer Tokenization Details

  • Log in to Magento admin, navigate to Customers > All Customers, and select the customer to view tokenization details.
  • If the customer is tokenizard, the Sezzle tab will appear.
  • The Customer UUID, Expiration Date and Status will appear on the tab.

Settlement Reports

  • Log in to Magento admin and navigate to Reports > Sales > Sezzle Settlement. A list of recent Settlement Reports will be shown.
  • To make a quick sync, enter the From and To Date and click on Sync.
  • Click on Download from the Action column to download a Settlement Report.
  • To view details of a particular Settlement Report, click on View from the Action column. You may also download the Settlement Report details from the Settlement Report view.
  • You can download the Settlement Report in CSV or Excel format.

Magento 2 Sandbox Testing

  • In the Sezzle configuration page of your Magento admin, enter the Sandbox API Keys from your Sezzle Merchant Sandbox Dashboard and set the Payment Mode to Sandbox, and save the configuration. Make sure you are doing this on your dev/staging website.
  • On your website, add an item to the cart, then proceed to Checkout and select Sezzle as the payment method.
  • To pay with Sezzle:
  • If customer is not tokenized, click Continue to Sezzle.
  • If customer is tokenized, click Place Order.
  • If In-Context checkout, click Pay with Sezzle.
  • For In-Context checkout, the Sezzle checkout will be hosted in the configured mode, iFrame or Popup. Otherwise, you will be redirected to the Sezzle checkout.
  • Sign In or Sign Up to continue.
  • Enter the payment details using test data, then advance to the final page.
  • Check the Approve {Website Name} to process payments from your Sezzle account for future transactions. You may revoke this authorization at any time in your Sezzle Dashboard to tokenize your account.
  • If your account is tokenized, the order will be placed without redirection. Otherwise you will be redirected to Sezzle Checkout to complete the purchase.
  • After payment is completed at Sezzle, you will be directed to your site's successful payment page.
  • Sandbox testing is complete. You can log in to your Sezzle Merchant Sandbox Dashboard to see the test order you just placed.

Magento 2 Live Checkout

  1. In the Sezzle configuration page of your Magento 2 admin, enter the API Keys from your Sezzle Merchant Dashboard and disable Sandbox/Test as the API Mode, then save the configuration.
  2. On your website, add an item to the cart, then proceed to Checkout and select Sezzle as the payment method.
  3. Click Place Order.
  4. If you are redirected to the Sezzle checkout page, your integration is complete. Congratulations!
    sezzle checkoutsezzle checkout
  5. Warning Don't complete the payment. Your checkout is now live, so you will be charged if you complete it.

Troubleshooting

If testing was unsuccessful, review the following:

  • Sezzle-Magento2 extension is the latest version.
  • Sezzle extension is enabled.
  • Go to System > Configuration > Sales > Payment Methods > Sezzle and ensure Enabled dropdown is reflecting Yes.
  • Merchant ID was entered correctly.
  • API Keys were entered correctly.
  • It is recommended to use the Copy icon in the Sezzle Merchant Dashboard (US/CA) or Sezzle Merchant Dashboard (EU) to avoid typos or extra spaces.
  • If you have multiple accounts with Sezzle, the merchant ID and API Keys are tied to only one URL.
  • Cache Storage was flushed.
  • Widget script is present on your website and reflects the Merchant ID from your
    Sezzle Merchant Dashboard (US/CA) or Sezzle Merchant Dashboard (EU).
  • Go to a product page on your website.
  • Right-click then select Inspect.
  • In the Elements tab, search for widget.sezzle.