ckpay-sdk
Version:
CkPay SDK for Internet Computer payment processing - a decentralized payment solution with multi-token support, modal integration, and subscription management.
41 lines (28 loc) • 1.01 kB
Markdown
# ckPay SDK
This is the official Javascript SDK for ckPay, a decentralized payment processing solution built on the Internet Computer.
## Installation
```bash
npm install ckpay-sdk
```
## Usage
```javascript
import { PaymentModal, openPaymentModal, closePaymentModal } from 'ckpay-sdk';
// Option A: render within your React tree
// <PaymentModal {...props} />
// Option B: one-liner helper that creates a container and opens the modal
openPaymentModal({
canisterId: 'ryjl3-tyaaa-aaaaa-aaaba-cai',
productId: 'prod_123',
theme: { primary_color: '#3b82f6' },
containerId: 'ckpay-modal-container' // optional
});
// Later, to close programmatically
closePaymentModal();
```
## Features
- Multi-token support (ICP, ckBTC, ckETH, etc.)
- Seamless payment modal integration
- Subscription and recurring payment management
- Coupon and discount functionality
- Secure and decentralized payment processing
For more information, please visit the [ckPay website](https://ckpay.io) (coming soon).