Skip to main content

Overview

This page documents the merchant invoice contract used by pepay.

Authentication

Merchant invoice APIs accept either:
  • x-api-key: <merchant_api_key>, or
  • Authorization: Bearer <jwt>

Request

Endpoints (SDK-supported):
  • POST /api/v1/invoices (create)
  • GET /api/v1/invoices (list)
  • GET /api/v1/invoices/customer/{customerId} (list by customer)
  • GET /api/v1/invoices/{invoiceId} (retrieve)
  • GET /api/v1/invoices/{invoiceId}/status (status)
  • GET /api/v1/invoices/totals (totals)
Payor/session helpers (browser-safe auth):
  • GET /api/v1/payments/payment-status
  • POST /api/v1/invoice/{invoiceId}/verify
  • GET /api/v1/invoice/{invoiceId}/verify
Playground (interactive reference): Example (create invoice):
Notes:
  • expires_in is milliseconds (default 12 hours, max 30 days).

Response

Example response (create):

Errors

  • 401/403 missing/invalid auth
  • 400 invalid invoice payload
  • 429 rate limits
Example (invalid payload):

Examples

Pagination + status semantics:
  • List endpoints use cursor pagination (see Pagination).
  • Common status fields:
    • Invoice status: unpaid, underpaid, paid, expired, canceled
    • Payment receipt status: pending, underpaid, confirmed, manual_retry
    • Settlement status (merchant-safe): pending, processing, manual, failed, settled
Next: Events