Skip to main content
GET
/
api
/
v1
/
payments
/
session-details
Get payment session details
curl --request GET \
  --url https://api-beta.pepay.io/api/v1/payments/session-details \
  --header 'x-session-token: <api-key>' \
  --header 'x-signature: <api-key>'
{
"invoice_id": "550e8400-e29b-41d4-a716-446655440000",
"amount_usd": 100,
"description": "Premium subscription",
"expires_at": "2024-01-01T12:00:00Z",
"invoice_status": "unpaid",
"remaining_time": 3600000,
"amount_remaining_usd": 100,
"merchant_name": "Acme Corp",
"merchant_email": "[email protected]",
"network_environment": "mainnet",
"locked_network": null,
"locked_token_id": null,
"locked_payment_address": null
}

Overview

Use this endpoint in a browser/client checkout to fetch the session’s invoice context (amount, addresses, supported tokens, and more).

Authentication

Payment session endpoints require x-session-token + x-signature (browser-safe auth).

Request

SDK

const session = await pepay.paymentSessions.getSessionDetails();

cURL

curl "https://api-beta.pepay.io/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": "[email protected]",
  "network_environment": "devnet"
}

Errors

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

Examples

  • Render a checkout UI by combining session details + available tokens + payment addresses.
Next: Payment status

Authorizations

x-session-token
string
header
required

Payment session token (opaque). Returned when creating an invoice; send on every request.

x-signature
string
header
required

Payment session signature in the format signature_hash.timestamp_ms (returned with the invoice/session).

Response

Session details

invoice_id
string<uuid>
amount_usd
number
description
string | null
expires_at
string<date-time>
invoice_status
enum<string>
Available options:
unpaid,
underpaid,
paid,
expired,
canceled
remaining_time
number

Milliseconds until expiration (clamped at 0).

amount_remaining_usd
number | null
merchant_name
string
merchant_email
string
network_environment
enum<string>
Available options:
mainnet,
devnet
locked_network
string | null

Network locked for remaining payment when status is underpaid.

locked_token_id
integer | null

Token locked for remaining payment when status is underpaid.

locked_payment_address
string | null

Current payment address for the locked network/token (underpaid only).