Skip to main content
Version: v2

Sessions API Error Codes

This document provides a comprehensive reference for session-level errors in the Convenient Checkout API. These errors help identify issues with session creation, access, and validation.

Quick Reference to Related Error Codes

Error Codes Summary

Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Session Controller Validation
Card WS2 check has failedINVALID_REQUEST400 BAD REQUESTCard WS2 check has failed.WS2 verification of agent information (e.g., MSID) failed during session creationEnsure agent userid is part of PCI_WorkStation group
Session Id not foundNOT_FOUND404 NOT FOUNDSession Id not foundWhen requesting a session that doesn't existCheck that the session ID is correct and the session has been created
Your session has been canceledSESSION_CANCELED410 GONEYour session has been canceledWhen requesting a canceled sessionCreate a new session; canceled sessions cannot be reused
Your session is no longer validSESSION_TIMEOUT401 UNAUTHORIZEDYour session is no longer validWhen requesting an expired sessionCreate a new session; expired sessions cannot be reused
Not allowed to access this sessionFORBIDDEN403 FORBIDDENNot allowed to access this sessionWhen merchant ID in request doesn't match the session's merchant IDUse the same merchant credentials that were used to create the session
Customer Identifier is MissingINVALID_REQUEST400 BAD REQUESTCustomer identifier is missingWhen customer identifier is not provided for session modes: PAYMENT_METHOD_ENTRY, WALLET, PAYMENT_METHOD_SELECT, PAYMENT_METHOD_DISPLAYInclude a valid customer identifier (hsid, enterpriseId, or metadata)
Consent is requiredINVALID_REQUEST400 BAD REQUESTConsent is required!When consent is missing in PAYMENT modeInclude a valid consent object with the required fields
payment is requiredINVALID_REQUEST400 BAD REQUESTpayment is requiredWhen payment object is missing for session modes: PAYMENT, PAYMENT_WITH_WALLETInclude a valid payment object with the required fields

Error Codes Details

Session Controller Validation

Card WS2 check has failed

Scenario: WS2 verification of agent information (e.g., MSID) failed during session creation.

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Card WS2 check has failed.",
"errorDetails": null
}
Session Id not found

Scenario: When requesting a session that doesn't exist

Sample Request:

GET v1/sessions/00000000-0000-0000-0000-000000000000
X-Merchant-Id: 123e4567-e89b-12d3-a456-426614174000
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Sample Response:

{
"status": 404,
"title": "NOT_FOUND",
"detail": "Session Id not found"
}
Your session has been canceled

Scenario: When requesting a canceled session

Sample Request:

GET v1/sessions/123e4567-e89b-12d3-a456-426614174001
X-Merchant-Id: 123e4567-e89b-12d3-a456-426614174000
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Sample Response:

{
"status": 410,
"title": "SESSION_CANCELED",
"detail": "Your session has been canceled"
}
Your session is no longer valid

Scenario: When requesting an expired session

Sample Request:

GET v1/sessions/123e4567-e89b-12d3-a456-426614174002
X-Merchant-Id: 123e4567-e89b-12d3-a456-426614174000
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Sample Response:

{
"status": 401,
"title": "SESSION_TIMEOUT",
"detail": "Your session is no longer valid"
}
Not allowed to access this session

Scenario: When merchant ID in request doesn't match the session's merchant ID

Sample Request:

GET v1/sessions/123e4567-e89b-12d3-a456-426614174000
X-Merchant-Id: 99999999-e89b-12d3-a456-426614174000
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Sample Response:

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

Scenario: When customer identifier is not provided for session modes: PAYMENT_METHOD_ENTRY, WALLET, PAYMENT_METHOD_SELECT, PAYMENT_METHOD_DISPLAY.

Sample Request:

{
"config": {
"modes": ["PAYMENT_METHOD_ENTRY"]
},
"payment": {
"amount": 1000,
"merchantTransactionId": "txn123456"
}
// customer object is missing
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Customer identifier is missing"
}
Consent is required

Scenario: When consent is missing in PAYMENT mode.

Sample Request:

{
"config": {
"modes": ["PAYMENT"]
},
"payment": {
"amount": 1000,
"merchantTransactionId": "txn123456"
},
"customer": {
"email": "test@example.com"
}
// consent object is missing
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Consent is required!"
}
payment is required

Scenario: When payment object is missing for session modes: PAYMENT, PAYMENT_WITH_WALLET.

Sample Request:

{
"config": {
"modes": ["PAYMENT_WITH_WALLET"]
},
"customer": {
"email": "test@example.com"
}
// payment object is missing
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "payment is required"
}