- install the SDK → 2) authenticate → 3) create an invoice → 4) observe status via REST or WebSockets.
1) Get API keys (dashboard)
Sign in to the Pepay Dashboard (login required) to create API keys:Pepay Dashboard Login
Create API keys for server-to-server integrations.
- Merchant API keys: use
x-api-keyfor/api/v1/*merchant endpoints (invoices, tokens, events). - Commerce API keys: use
x-commerce-api-keyfor/api/commerce/*endpoints (search, carts, checkout, orders).
[email protected].
2) Install the SDK
3) Configure your environment variables
- Base URL:
https://api-beta.pepay.io - Dashboard login:
https://pepay.io/sign-in
4) Create an invoice (server)
5) Observe status (REST)
6) Observe events (WebSockets)
For realtime delivery, mint a short-livedws_token server-to-server and connect to the merchant stream:
- Mint token:
POST /api/v1/ws/token - Connect:
wss://…/ws/merchant/events?token=<ws_token>

