Skip to main content
This page is designed for first success quickly:
  1. 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.
You’ll see two key types in the dashboard:
  • Merchant API keys: use x-api-key for /api/v1/* merchant endpoints (invoices, tokens, events).
  • Commerce API keys: use x-commerce-api-key for /api/commerce/* endpoints (search, carts, checkout, orders).
If you need access or onboarding support, email support@pepay.io.

2) Install the SDK

3) Configure your environment variables

Defaults used in these docs:
  • Base URL: https://api-beta.pepay.io
  • Dashboard login: https://pepay.io/sign-in

4) Create an invoice (server)

Example response:

5) Observe status (REST)

6) Observe events (WebSockets)

For realtime delivery, mint a short-lived ws_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>
Next: Install