Skip to main content

Overview

This method is used by payor checkout UIs to determine whether the invoice has been paid, expired, or still requires payment.

Authentication

Requires x-session-token + x-signature.

Request

Fetch payment status

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

Response

{
  "status": "unpaid",
  "paid_at": null
}
If status is underpaid, fetch session details to get the locked network/token:
const details = await pepay.paymentSessions.getSessionDetails();

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: Customer email