Skip to main content

Overview

These endpoints store a customer email address in the payment session context (useful for receipts, order updates, or merchant support workflows).

Authentication

Requires:
  • x-session-token: pst_...
  • x-signature: sig_...

Request

Endpoints:
  • POST /api/v1/payments/customer-email
  • GET /api/v1/payments/customer-email
Example (set email):
BASE_URL=${PEPAY_API_URL}

curl -X POST "$BASE_URL/api/v1/payments/customer-email" \
  -H "x-session-token: pst_..." \
  -H "x-signature: sig_..." \
  -H "Content-Type: application/json" \
  -d '{"email":"customer@example.com"}'

Response

Example (set):
{
  "success": true,
  "email": "customer@example.com",
  "message": "Email added successfully"
}

Errors

  • 401 invalid session token/signature
  • 400 invalid email address or invoice already paid
  • 410 invoice expired

Examples

Example (get email):
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/v1/payments/customer-email" \
  -H "x-session-token: pst_..." \
  -H "x-signature: sig_..."
Next: Invoice questions