open-index/open-npm huggingface dataset:
npm package: @payfurl/client
Description: The Client SDK is used to securely collect payment details in the browser. It seamlessly integrates into your existing payment page.
Latest version: 4.7.2

# PayFURL Client SDK

The Client SDK is used to securely collect payment details in the browser. It seamlessly integrates into your existing payment page.

When initialized, the SDK securely loads an iframe hosted by payFURL. 
This iframe collects the payment details, which are then submitted to payFURL and converted to a payment token. 
The payment token is added as a hidden input to the form. For PayPal or Buy Now Pay Later payments, the payment details are converted to a transactionId, which is also added as a hidden input to the form. 
Payment detail collection is triggered when the form is submitted.

## Installation
Use npm to install the PayFURL Client SDK:

 ```bash
 npm install @payfurl/client-sdk
 ```

Import the SDK into your application:

 ```javascript
 import payfurl from '@payfurl/client-sdk';
 ```

## Usage

To initialize the SDK, use the following code:

 ```javascript
 import payfurl from '@payfurl/client';
 const pf = payfurl.init(
   "sandbox", // environment name
   "<public-key>", // your public key
   true // enable debug mode
 );
 ```

To create a drop-in UI:

 ```javascript
 pf.addDropIn('<id-of-div-container>', 20, 'AUD');
  ```

For more thorough documentation, visit [the PayFURL Client SDK docs](https://docs.payfurl.com/client_sdk/).