Apply Only

📘

Installation requires a Public API Key

If you have not yet received your Public API Key, please contact Progressive Leasing.

Starting the Apply Flow

  1. Add the following code inside the <head> tag on the page where the apply flow will appear:
<script src="https://demo-connect.progleasing.com/progconnect/api/widget-init.js"></script>
  1. Add the prog-connect widget in the area where the button should be shown:
<prog-connect></prog-connect>
  1. Add the following script to the bottom of the page:
<script>
  ProgConnect.onPaymentClick(() => {
        var checkout = {
            merchant: {
                key: "", // Replace with your public key
                siteConfig: {
                    cardNumber: "#card-number-selector",
                    cvv: "#cvv-selector",
                    expiration: "#expiration-selector",
                    name: "#name-on-card-selector",
                    address: "#address-on-card-selector",
                    city: "#city-on-card-selector",
                    state: "#state-on-card-selector",
                    zip: "#zip-selector"
                },
              	flowType: "applyOnly",
             },
              customer: {
                address: {
                    shipping: {},
                    billing: {}
                }
            },
            callbacks: {
                onFailure: function (e) {
                    // handle the failure as needed
                    // OnFailure call format { message: friendly_string, id: id_string } 
                    // errors occuring before an approval will not include Lease ID
                    console.log(e);
                },
                onSuccess: function (s) {
                  // handle successful applications
                },
                onCancel: function () {
                  // handle customer cancellation
                }
            }	
        };
        return checkout;
    });
</script>
  1. Update line 5 with your Public API Key.
  2. You're done!