Integration Guide (npm package)

The Apply and Checkout UI's are the main tools ChargeAfter provides merchants to advertise, display, and promote, the availability of financing options while shopping on the merchant website.

The Checkout UI
Lives on the checkout page of the merchant eCommerce website. It allows the consumer to apply for financing and finalize their purchase with ease. The UI modal securely collects relevant details provided by the consumer, displays the approved financing offer(s), and facilitates the legal process of confirming the offer and completing the transaction.

The Apply UI
Is a powerful tool that allows a consumer to apply for financing and know ahead of time the amount that was approved. The Apply UI is a sales enabler that helps merchants generate more opportunities, improve their average order value (AOV) and significantly improve conversion rates (CVR), minimizing cart abandonment by getting pre-approved for financing.

The Apply UI is recommended to be placed on a designated page elaborating on the financing options and resides within the promotional widget.

Installing

npm install --save @chargeafter/payment-sdk

Getting Started

import { prequalify, checkout } from "@chargeafter/payment-sdk";
// for optional fields, '*' near the option designates the default value

// open modal to obtain available credit
await prequalify({
    config: {
        env: {
            name?: "production"* | "sandbox",
            apiKey: "<your api key>",
        }
    },
    ...
});

// open modal to perform full checkout
await checkout({
    config: {
        env: {
            name?: "production"* | "sandbox",
            apiKey: "<your api key>",
        }
    },
    cartDetails: ...
    ...
});