Collect.js
Collect.js is a library for implementing the Collect widget - the Collect widget is a safe and secure web drop-in module that provides a simple interface for users to select their preferred payment method during checkout.
Using npm:
For JS frameworks, import it and use;
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
String | true | Email address. | ||
firstName | String | true | First name. | |
lastName | String | true | Last name. | |
reference | Number | true | Unique transaction reference | |
amount | Number | true | Amount to charge. | |
currency | String | false | NGN | Processing currency |
itemImage | String(URL) | false | URL for item image | |
publicKey | String | true | The Collect public api key. | |
logo | String(URL) | false | Collect's Logo | |
callbackUrl | String(URL) | false | ||
onSuccess | false | Action to perform after widget is successful | ||
onClose | false | Action to perform after widget is closed | ||
onError | false | Action to perform on widget Error | ||
beforeClose | fasle | Action to perform before widget close |