Marks a checkout session as expired so it can no longer accept payment.
Use this when you mint a fresh checkout session for a logical purchase that already had one outstanding (for example, a customer requested a new payment link after the original expired). Without explicitly expiring the old session, its URL remains payable until the session’s natural 30-minute TTL elapses, which can let a customer who reloads the old tab pay twice.
Mirrors Stripe’s POST /checkout/sessions/{id}/expire.
Idempotent. Calling expire on a session that is already in a terminal state (success, failed, cancelled, expired) returns 200 with the current status — no error. Only pending and initiated sessions are flipped.
Documentation Index
Fetch the complete documentation index at: https://docs.paybridgenp.com/llms.txt
Use this file to discover all available pages before exploring further.
Your PayBridge API key. Obtain one from the dashboard under Settings → API Keys. Prefix: pk_sandbox_ for testing, pk_live_ for production.
The checkout session id (e.g. cs_01j9x2k3m4n5p6q7r8s9t0u1v2).
Session expired (or was already terminal).
"cs_01j9x2k3m4n5p6q7r8s9t0u1v2"
The session's current status after the expire call.
pending, initiated, success, failed, cancelled, expired hosted, redirect esewa, khalti, fonepay