@clickpesa/payout-widget
v1.1.5
Published
[![npm](https://img.shields.io/npm/v/@clickpesa/payout-widget)](https://www.npmjs.com/package/@clickpesa/payout-widget) [![NPM](https://img.shields.io/npm/l/@clickpesa/payout-widget)](https://www.npmjs.com/package/@clickpesa/payout-widget)
Downloads
187
Readme
@clickpesa/payout-widget
Descriptions
- Helps ClickPesa users to make payouts
Installation
npm install @clickpesa/payout-widget
or
yarn add @clickpesa/payout-widget
Usage
import PayoutWidget from "@clickpesa/payout-widget";
<PayoutWidget
clientId=""
theme={{
primaryColor: "primary color";
fontFamily: "font-family";
mode: "dark"
}}
payoutDetails={{
amount: 10000;
orderReference: "1234";
channel: "BANK"
}}
close={(payout: PayoutCallBackData) => {
console.log(payout)
}}
/>;
Where
type PayoutCallBackData = {
updatedAt: string;
createdAt: string;
id: string;
orderReference?: string;
amount: string;
currency: string;
fee: string;
status: string;
channel: string;
channelProvider: string;
settlementType?: string;
notes?: string;
beneficiary?: {
accountNumber: string;
accountName: string;
swiftNumber?: string;
routingNumber?: string;
beneficiaryMobileNumber?: string;
beneficiaryEmail?: string;
};
};
Props
| Name | Type | Default | Required | Description |
| ------------- | ---------- | ------- | -------- | ------------------------------ |
| clientId | string
| | `true` | ClickPesa application clientId |
| theme | `object` |
| false
| Custom Theme |
| payoutDetails | object
| | `false` | Initial Payout Details |
| close | `function` |
| false
| Callback onclose |