Skip to main content

Overview

Payment session endpoints are designed for browser/client checkout experiences. They expose invoice context in a browser-safe way using session headers.

Authentication

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

Request

Endpoint:
  • GET /api/v1/payments/session-details
Playground (interactive reference): Example:
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/v1/payments/session-details" \
  -H "x-session-token: pst_..." \
  -H "x-signature: sig_..."

Response

{
  "invoice_id": "550e8400-e29b-41d4-a716-446655440000",
  "amount_usd": 49.99,
  "description": "Starter plan",
  "expires_at": "2025-12-21T13:00:00.000Z",
  "invoice_status": "unpaid",
  "remaining_time": 3600000,
  "merchant_name": "Pepay Demo Merchant",
  "merchant_email": "billing@example.com",
  "network_environment": "devnet",
  "locked_network": null,
  "locked_token_id": null,
  "locked_payment_address": null
}

Underpaid lock-in

If invoice_status is underpaid, the response includes:
  • locked_network
  • locked_token_id
  • locked_payment_address
Payors must complete the remaining balance with the locked token/network.

Errors

  • 401 invalid session token/signature
  • 404 session not found / expired

Examples

Next: Available tokens