1.0.9 • Published 2 years ago

@banq/checkout-widget v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Overview

Our Checkout widget enables platforms to quickly process payments from cards, ACH, and banq user's balance by loading a javascript widget which contains the end to end payment flow. The payment processed by the checkout widget is configured from a backend API call and funds are settled into the merchant's banq business account.

Overview

Types of Payments

The Open API supports a flexible set payments including:

  • One time real-time payments
  • Recurring payments
  • Scheduled payments

Payment Sources

End users can make payments from their:

  • banq balance
  • checking account
  • debit & credit cards (depending on the merchants industry)

Installation

To install the stable version:

npm install --save @banq/checkout-widget

or using yarn:

yarn add @banq/checkout-widget

Usage

Add this import to starting point of your project such as: index.js or index.ts files

import '@banq/checkout-widget';

Create a <checkout-widget-dialog/> element with required attributes mentioned below.

<checkout-widget-dialog
  open="true"
  mode="payment-flow"
  environment="sandbox"
  paymentLink="https://link.banq.com/qxU6gO79Ajb"
  signUpFlow="long-sign-up"
/>

Attributes:

nameRequiredDescription
openShows checkout widget when truthy
modeIf you have some anticipated sales material, it's beneficial to allow your end-users to pre-register with banq and add payment methods before the sales material is available for purchase. Possible values: payment-flow, pre-register-flow
environmentEnvironment you want to use. If you want test widget use sandbox. Possible values: sandbox,production
paymentLinkPayment link required to enable payments. When mode:pre-register is set paymentLink attribute is not required. See Generate Payment Link Docs for more information
themeWidget theme. Possible values: dark, light
signUpFlowTypeEnables you to choose which sign up flow to use. Possible values: short-sign-up, long-sign-up

Events:

nameDescription
closeFires after widget closes
successPaymentFires when user creates payment

Create a <pay-with-banq-button/> element with required attributes mentioned below.

<pay-with-banq-button
  disabled="false"
  loading="false"
  error="false"
  mode="payment-flow"
  name="Messi Drop"
/>

Attributes:

nameRequiredDescription
disabledDisables pay with banq button Shows checkout widget when truthy
loadingShows loading indicator
errorShows error indicator
modeIf you have some anticipated sales material, it's beneficial to allow your end-users to pre-register with banq and add payment methods before the sales material is available for purchase. Possible values: payment-flow, pre-register-flow Payment link required to enable payments. When mode:pre-register is set paymentLink attribute is not required. See Generate Payment Link Docs for more information
nameWidget placement name for analytics. Possible values: name of the drop

Styling:

pay-with-banq-button uses Shadow CSS ::part spec. It has button inside defined as button part img.png

<style>
  .pay-with-banq::part(button){
    width: 100% /* Those styles apply to button in shadow root */
  }
</style>
<pay-with-banq-button 
  class="pay-with-banq"
  disabled="false"
  loading="false"
  error="false"
  mode="payment-flow"
  name="Messi Drop"
/>

See more about ::part() on https://developer.mozilla.org/en-US/docs/Web/CSS/::part

Events:

nameDescription
clickFires on button click

<pay-with-banq-button> extends all button events

1.0.9

2 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago