Overview
Installpepay to access Pepay APIs via a typed client and resource groups (invoices, tokens, commerce, events, websockets).
Authentication
You’ll need API credentials to make authenticated requests:- Merchant server:
PEPAY_API_KEY(maps tox-api-key) - Commerce server:
PEPAY_COMMERCE_API_KEY(maps tox-commerce-api-key) - Payor/browser: session token + signature (returned by invoice creation)
Request
Requirements
- Node.js 18+ (recommended for server integrations)
- Evergreen browsers for client integrations (payor/session flows only)
Install
Import (TypeScript / ESM)
Import (CommonJS)
Response
After install, you can construct a client and call resources:Errors
ERR_MODULE_NOT_FOUND/ import errors: ensure Node 18+ and a compatible module system (ESM vs CommonJS).- Network/auth errors at runtime: verify credentials and base URL configuration.

