- GET [/instances/$INSTANCE]/sessions/$SESSION_ID?fulfillment_url=$URL#
Query the payment status for a session and fulfillment URL. This endpoint is for Web shops, Paivana and other integrations (like JavaScript from inside the customer’s browser) that need an unauthenticated way to query a payment status where they do not know the order ID because they only know the session ID they passed into the template mechanism. Here, the “$SESSION_ID” is an arbitrary string, the semantics of which are left to the application. However, it must match the “$SESSION_ID” passed to the template mechanism.
Since protocol v25.
Request:
- Query Parameters:
fulfillment_url=URL – Mandatory. Specifies the fulfillment URL for which the order must be valid.
timeout_ms=NUMBER – Optional. If specified, the merchant backend will wait up to
timeout_msmilliseconds for completion of the payment before sending the HTTP response. A client must never rely on this behavior, as the merchant backend may return a response immediately.
Response:
- 200 OK:
The response is a GetSessionStatusPaidResponse. Returned if an order that paid for the respective session exists and was paid.
- 202 Accepted:
The response is a GetSessionStatusUnpaidResponse. Returned if an order that paid for the respective session exists, but not yet paid.
- 404 Not found:
The merchant backend is unaware of an order matching the given session.
Details:
interface GetSessionStatusPaidResponse { // Order ID of the paid order. order_id: string; }
interface GetSessionStatusUnpaidResponse { // Order ID of the unpaid order. order_id: string; }