Skip to main content
Version: v2

Checkout Session Authorization Error Codes

This document provides a comprehensive reference for session authorization errors in the Convenient Checkout API. These errors help identify issues with checkout session authentication and authorization.

Error Codes Summary

Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Checkout Session AuthorizationFORBIDDEN403 FORBIDDENAccess denied when attempting to save payment method using completed sessionAttempting to save payment method with a completed checkout sessionCreate a new session for saving payment methods; completed sessions cannot be reused
FORBIDDEN403 FORBIDDENAccess denied when attempting to save payment method using PAYMENT modeAttempting to save payment method when session is in payment modeUse PAYMENT_METHOD_ENTRY or WALLET or PAYMENT_WITH_WALLET mode for saving payment methods
FORBIDDEN403 FORBIDDENAccess denied when attempting to poll setup payment method using PAYMENT modeAttempting to poll for setup status when session is in payment modeUse PAYMENT_METHOD_ENTRY or WALLET or PAYMENT_WITH_WALLET mode for saving payment methods
FORBIDDEN403 FORBIDDENAccess denied when attempting to save payment method using cancelled sessionAttempting to save payment method with a cancelled checkout sessionCreate a new session; cancelled sessions cannot be reused
FORBIDDEN403 FORBIDDENNot allowed to access this sessionWhen merchant2 tries to access a session initiated by merchant1Use the same merchant credentials that were used to create the session

Error Codes Details

Checkout Session Authorization

Using Completed Session

When attempting to save a payment method, the checkout session (identified by the checkoutId in the header) must not be in a completed state.

Sample Error Response:

{
"title": "FORBIDDEN",
"status": 403,
"detail": "Access denied when attempting to save payment method using completed session"
}
Session in Payment Mode

When attempting to save a payment method, the checkout session (identified by the checkoutId in the header) must not be in PAYMENT mode. Payment method saving is only allowed in SETUP or SETUP_AND_PAYMENT modes.

Sample Error Response:

{
"title": "FORBIDDEN",
"status": 403,
"detail": "Access denied when attempting to save payment method using PAYMENT mode"
}
Polling in Payment Mode

When polling for the status of a payment method setup operation, the checkout session (identified by the checkoutId in the header) must not be in PAYMENT mode.

Sample Error Response:

{
"title": "FORBIDDEN",
"status": 403,
"detail": "Access denied when attempting to poll setup payment method using PAYMENT mode"
}
Using Cancelled Session

When attempting to save a payment method, the checkout session (identified by the checkoutId in the header) must not be in a cancelled state.

Sample Error Response:

{
"title": "FORBIDDEN",
"status": 403,
"detail": "Access denied when attempting to save payment method using cancelled session"
}
Cross-Merchant Session Access

When a merchant attempts to access a session that was created by a different merchant. The merchant ID is verified against the session's originating merchant, and if they don't match, the request is rejected.

Sample Request:

GET v1/sessions/{sessionId}
X-Merchant-Id: merchant2-uuid
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Sample Error Response:

{
"title": "FORBIDDEN",
"status": 403,
"detail": "Not allowed to access this session"
}