Skip to main content
GET
/
api
/
v1
/
payments
/
payment-status
Check payment status
curl --request GET \
  --url https://api-beta.pepay.io/api/v1/payments/payment-status \
  --header 'x-session-token: <api-key>' \
  --header 'x-signature: <api-key>'
{
  "status": "paid",
  "paid_at": "2024-01-01T12:30:00Z"
}

Overview

Use this endpoint to check whether the invoice is unpaid/paid/expired and whether a payment is pending/confirmed.

Authentication

Payment session endpoints require x-session-token + x-signature.

Request

SDK

const status = await pepay.paymentSessions.getPaymentStatus();

cURL

curl "https://api-beta.pepay.io/api/v1/payments/payment-status" \
  -H "x-session-token: pst_..." \
  -H "x-signature: sig_..."

Response

{
  "status": "unpaid",
  "paid_at": null
}

Errors

  • 401 invalid session token/signature

Examples

Poll until paid:
while (true) {
  const s = await pepay.paymentSessions.getPaymentStatus();
  if (s.status === 'paid') break;
  await new Promise((r) => setTimeout(r, 1500));
}
Next: Merchant events WebSocket

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

Payment status retrieved successfully

status
enum<string>

Current payment status

Available options:
unpaid,
underpaid,
paid,
expired
paid_at
string<date-time> | null

Timestamp when payment was completed (null if not paid)