clockpay-react
v1.1.0
Published
[](https://badge.fury.io/js/clockpay) [](https://opensource.org/licenses/MIT)
Downloads
88
Readme
ClockPay Reactjs SDK
A lightweight, type-safe React.js SDK for integrating ClockPay payment services, including payment links and currency support, to streamline secure client-side payments.
Installation
Using npm:
npm install clockpay-reactUsing yarn:
yarn add clockpay-reactUsing pnpm:
pnpm add clockpay-reactUsage
Importing the SDK using ES modules
import { PaymentButton } from 'clockpay-react';Quick Start
import { PaymentButton } from 'clockpay-react';
// Initialize the SDK
<PaymentButton
publicKey='clockpay_public_key_....'
clientSecret='secret'
/>API Reference
Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| publicKey | string | Yes | Gotten from the business account developer dashboard |
| clientSecret | string | Yes | Gotten from the server-side response |
| backgroundColor | string | No | Allows you to style the background-color eg. backgroundColor="#ffffff" |
| borderColor | string | No | Allows you to style the border-color eg. borderColor="#ffffff" |
| textColor | string | No | Allows you to style the text-color eg. textColor="#000000" |
License
This project is licensed under the MIT License - see the LICENSE file for details.
