@clickpesa/checkout-link-widget
Descriptions
- Helps ClickPesa users to create checkout link to receive payments
Installation
npm install @clickpesa/checkout-link-widget
or
yarn add @clickpesa/checkout-link-widget
Usage
import CheckoutLinkWidget from "@clickpesa/checkout-link-widget";
<CheckoutLinkWidget
clientId=""
theme={{
primaryColor: "primary color";
fontFamily: "font-family";
mode: "dark"
}}
orderDetails={{
orderReference: "1234";
orderCurrency: "TZS"
}}
close={(checkoutLink: string) => {
console.log(checkoutLink)
}}
/>;
## Props
| Name | Type | Default | Required | Description |
| ------------- | ---------- | ------- | -------- | ------------------------------ |
| clientId | `string` | `` | `true` | ClickPesa application clientId |
| theme | `object` | `` | `false` | Custom Theme |
| orderDetails | `object` | `` | `false` | Initial Payout Details |
| close | `function` | `` | `false` | Callback onclose |
Learn More