Skip to main content

Add session payments

Add acceptSessions: 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 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