Logo Lanfrica

Yug3ne/payd-sdks

Domaine:

digital infrastructure

Type de record:

software
Créateur:
Yug
Hôte:
Payd SDKs — collect payments, send payouts, and manage transactions across Africa, Test your api keys below # Payd SDKs Sdks for the Payd payments API — collect payments, send payouts, and manage transactions across Africa. ## Packages | Package | Language | Status | Install | |---------|----------|--------|---------| | `payd-node-sdk` | TypeScript / Node.js | Stable | `npm install payd-node-sdk` | ## Repository Structure ``` payd-sdks/ shared/ fixtures/ # Canonical JSON request/response examples (used by all SDKs and tests) node/ # TypeScript/Node.js SDK src/ # Source code tests/ # Unit tests (101 tests) examples/ # Runnable usage examples playground/ # Interactive test dashboard (Express + vanilla HTML, local/internal use) ``` ## Quick Start ### Node.js SDK ```bash npm install payd-node-sdk ``` ```typescript import { PaydClient } from "payd-node-sdk"; const payd = new PaydClient({ apiUsername: process.env.PAYD_API_USERNAME!, apiPassword: process.env.PAYD_API_PASSWORD!, }); // Collect via M-Pesa const result = await payd.collections.mpesa({ username: "my_payd_user", amount: 500, phoneNumber: "0700000000", narration: "Order #1234", callbackUrl: "example.com", }); console.log(result.transactionReference); ``` See the full Node.js SDK README for all operations. ## Local Testing (before npm publish) If you're testing the SDK locally — either contributing or trying it out before it's on npm — follow these steps. ### Prerequisites - Node.js 18+ - Git - Payd API credentials (get them from app.payd.money) ### 1. Clone and build the SDK ```bash git clone github.com cd payd-sdks/node npm install npm run build # compiles TypeScript → dist/ npm test # runs 101 unit tests to verify everything works ``` ### 2. Run the interactive test dashboard (local/internal only) The test app lets you test every SDK operation from a web UI. ```bash cd ../playground npm install npm start ``` The playground is intentionally blocked in production by …

Languages

Licenses