Unified African Payment Integration - TypeScript SDK, embeddable widget, and MCP server.
# Chia
Unified TypeScript tooling for African payment providers. Chia wraps PayChangu, PawaPay, and OneKhusa behind one type-safe interface.
**Documentation: docs.usechia.com**
## Standalone by design
Everything in this repository works without a Chia account. Bring your own
provider credentials (PayChangu, PawaPay, OneKhusa) and use the SDK or MCP
server directly against the provider APIs - no platform in between.
The hosted **Chia platform** (usechia.com) is a
separate, optional product built on this SDK: managed recurring billing over
mobile money - plans, hosted checkout, automatic renewals and retries,
webhooks, and weekly payouts - for when you would rather not run that
machinery yourself.
## Packages
| Package | Description | Docs |
|---------|-------------|------|
| **@chiahq/sdk** | TypeScript SDK for direct provider API access | SDK docs |
| **@chiahq/widget** | Embeddable subscription widget - one script tag, no backend | Widget docs |
| **@chiahq/react** | React hooks and components for subscription management and the customer portal | React docs |
| **@chiahq/mcp** | MCP server exposing payment operations to AI assistants | MCP docs |
## Quick Start
```bash
npm install @chiahq/sdk
# or
pnpm add @chiahq/sdk
# or
yarn add @chiahq/sdk
```
```typescript
import { ChiaSDK } from "@chiahq/sdk";
const sdk = ChiaSDK.initialize({
paychangu: {
secretKey: process.env.PAYCHANGU_SECRET_KEY,
environment: "DEVELOPMENT",
},
pawapay: {
jwt: process.env.PAWAPAY_JWT,
environment: "DEVELOPMENT",
},
onekhusa: {
apiKey: process.env.ONEKHUSA_API_KEY,
apiSecret: process.env.ONEKHUSA_API_SECRET,
organisationId: process.env.ONEKHUSA_ORGANISATION_ID,
environment: "DEVELOPMENT",
},
});
// Unified - route a payment across whatever providers are configured
const payment = await sdk.payments.initiate({
reference: "order-123",
amount: "50.00",
currency: "ZMW",
msisdn: "260971234567",
country: "ZMB",
});
payment.provider // "pawapay" - routed by country and currency
payme …