Skip to main content

Cancel existing Redirect Session

The Merchant can also cancel an existing redirect session, which was previously created and to which the customer has been redirected, to make sure that the redirect session cannot be used anymore by the customer. This could be useful for example when a customer wants to withdraw via Zastrpay money from its wallet at a Merchant, the merchant has reserved already the withdrawal amount, but the journey has been interrupted/abandoned. When the customer requests an immediate cancellation of the reservation in the Merchant System before the redirect session has expired (e.g. 15 minutes), then the merchant wants to make sure that no QR code can be (concurrently) generated for this redirect session. For that purpose the following Merchant Backend -> Zastrpay Backend API call must be implemented:

POST https://host.com/customer-authentication-service/v1/redirect-sessions/{redirectSessionId}/cancel
Content-Type: application/json
x-api-key: $apiKey
x-request-id: $requestId
note

redirectSessionId must be already known to the Merchant, which should be anyway the case, as the Merchant is the one who generates the redirectSessionId and calls Create Redirect Session API.

Zastrpay Backend will answer with the following response:

200 OK

{
"id": "{redirectSessionId}",
"state": "Cancelled"
}

See Cancel Redirect Session API Reference for more information.