@clickpesa/payout-widget
Descriptions
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 |
Learn More