@payfurl/client
v4.6.20
Published
The Client SDK is used to securely collect payment details in the browser. It seamlessly integrates into your existing payment page.
Downloads
192
Readme
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:
npm install @payfurl/client-sdk
Import the SDK into your application:
import payfurl from '@payfurl/client-sdk';
Usage
To initialize the SDK, use the following code:
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:
pf.addDropIn('<id-of-div-container>', 20, 'AUD');
For more thorough documentation, visit the PayFURL Client SDK docs.