Add session payments
AddacceptSessions: true to payMiddleware on any route that should support session payments. The session ID is returned in the X-PRUDRA-SESSION-ID response header on the first request. Subsequent requests include this header to reuse the session without paying again.
- Dashboard
- SDK
- cURL
Dashboard support for session payment configuration is coming soon. Use the SDK to enable sessions on your routes.
Parameters
payMiddleware with sessions
Request headers
If
X-PRUDRA-SESSION-ID is absent or invalid, the request is treated as a new payment request (402 is returned).
Response fields
The
X-PRUDRA-SESSION-ID response header is also set on the first request.
Error handling
Next steps
- Handle multi-step workflows — the full two-request session flow
- Session expiry and renewal — default TTL and extending sessions
- Subscribe to vault events — watch session progress via SSE

