- Cancels a payment session
Creates a new payment session
Retrieves payment session details by ID
Cancels a payment session
POST {{baseURL}}/v2/payment-sessions/{{paymentSessionId}}/cancel
This endpoint cancels a payment session.
A payment session can only be canceled successfully if:
- The payment session must belong to the requesting merchant. The
merchantIdfrom the API token must match the session's merchant. It returns 403 Forbidden if it does not. - The session is in
Createdstatus. Any other status, such asCompleted,Failed, orCancelled, fails with the validation error: "Payment Session can be canceled only in Created status".
See Also:
To create a new payment session, see POST /v2/payment-sessions.
To retrieve a payment session by Id, see GET /v2/payment-sessions/{{paymentSessionId}}.
Security
Bearer
- Sandbox environmenthttps://sandbox.api.flute.com/v2/payment-sessions/{paymentSessionId}/cancel
- Production environmenthttps://api.flute.com/v2/payment-sessions/{paymentSessionId}/cancel
curl -i -X POST \
https://sandbox.api.flute.com/v2/payment-sessions/edf7b36a-1b2c-4d3e-4f5a-6b7c8d9e0f36/cancel \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'