Pepay API
PEPAY API Reference
Welcome to the PEPAY API documentation. This guide covers all API endpoints available through our REST API for cryptocurrency payment processing.
Authentication
All API requests require authentication using an API key. Include your API key in the request headers:
Base URL
Invoices
Create Invoice
Create a new payment invoice.
POST /api/v1/invoices
Headers:
Request Body:
Response: 200 OK
Get Invoice
Retrieve details of a specific invoice.
GET /api/v1/invoices/{customer_id}
Headers:
Response: 200 OK
List Invoices
Get a paginated list of invoices.
GET /api/v1/invoices
Query Parameters:
page
: Page number (default: 1)status
: Filter by status ('paid', 'unpaid', 'expired', 'all')customer_id
: Filter by customer
Headers:
Response: 200 OK
Get Invoice Totals
Get aggregated invoice statistics.
GET /api/v1/invoices/totals
Headers:
Response: 200 OK
Webhooks
Webhook Events
PEPAY sends webhook notifications for the following events:
invoice.paid
Full payment received
invoice.expired
Invoice expired without payment
invoice.partial_payment
Partial payment received
invoice.overpaid
Payment exceeds invoice amount
Webhook Payload
Webhook Security
Verify webhook authenticity using the signature in headers:
x-pepay-signature
: HMAC SHA-256 signaturex-pepay-timestamp
: Unix timestamp of the request
Error Handling
All API errors follow this format:
Common error codes:
INVALID_AMOUNT_FORMAT
: Invalid amount formatINVALID_AMOUNT_RANGE
: Amount outside allowed rangeIDEMPOTENCY_KEY_MISSING
: Missing idempotency keyINVOICE_CREATE_FAILED
: Generic creation failure
Rate Limits
100 requests per minute per API key
Webhook retries: 3 attempts with exponential backoff
Last updated