Session API Error Codes
This page documents all error codes for the Sessions API (v2). These errors occur when creating and managing checkout sessions. Each error includes the code name, HTTP status, description, recommended developer action, and notes where applicable.
Draft version
Error Summary
Authorization Error
| Error Title | HTTP Status | Error Message |
|---|---|---|
| FORBIDDEN | 403 FORBIDDEN | Access denied when attempting to save payment method using completed session |
| FORBIDDEN | 403 FORBIDDEN | Access denied when attempting to save payment method using PAYMENT mode |
| FORBIDDEN | 403 FORBIDDEN | Access denied when attempting to poll setup payment method using PAYMENT mode |
| FORBIDDEN | 403 FORBIDDEN | Access denied when attempting to save payment method using cancelled session |
| FORBIDDEN | 403 FORBIDDEN | Not allowed to access this session |
Resource Not Found Error
| Error Title | HTTP Status | Error Message |
|---|---|---|
| NOT_FOUND | 404 NOT FOUND | Session Id not found |
Business Rule Violation Error
| Error Title | HTTP Status | Error Message |
|---|---|---|
| INVALID_REQUEST | 400 BAD REQUEST | Card WS2 check has failed. |
| SESSION_CANCELED | 410 GONE | Your session has been canceled |
| SESSION_TIMEOUT | 401 UNAUTHORIZED | Your session is no longer valid |
| FORBIDDEN | 403 FORBIDDEN | Not allowed to access this session |
Schema validation error
| Error Title | HTTP Status | Error Message |
|---|---|---|
| INVALID_REQUEST | 400 BAD REQUEST | Customer identifier is missing |
| INVALID_REQUEST | 400 BAD REQUEST | Consent is required! |
| INVALID_REQUEST | 400 BAD REQUEST | payment is required |
Config Object
Customer Object
Payment Object
Agent Object
| Error Title | HTTP Status | Error Message |
|---|---|---|
| INVALID_REQUEST | 400 | agent.firstName cannot exceed 50 characters |
| INVALID_REQUEST | 400 | agent.lastName cannot exceed 50 characters |
| INVALID_REQUEST | 400 | agent.userId cannot exceed 50 characters |
| INVALID_REQUEST | 400 | agent.userId is required (move into business) |
Consent Object
| Error Title | HTTP Status | Error Message |
|---|---|---|
| INVALID_REQUEST | 400 BAD REQUEST | consentCollectionDetails.merchantConsentText is required and cannot exceed 1000 characters |
| INVALID_REQUEST | 400 BAD REQUEST | consentCollectionDetails.merchantConsentId is required and cannot exceed 100 characters |
| INVALID_REQUEST | 400 BAD REQUEST | consentCollectionDetails.consentCollectionTimestamp is required and must be in ISO 8601 format |
| INVALID_REQUEST | 400 BAD REQUEST | consentCollectionDetails is required when Collection Type is PPD |
| INVALID_REQUEST | 400 BAD REQUEST | agent is required when Collection Type is TEL or PPD |
Payment Details Object
| Error Title | HTTP Status | Error Message |
|---|---|---|
| UNPROCESSABLE_ENTITY | 422 UNPROCESSABLE ENTITY | paymentDetails.qualifiedAmount is required when paymentDetails is provided |
| UNPROCESSABLE_ENTITY | 422 UNPROCESSABLE ENTITY | sum of paymentDetails.qualifiedAmount and paymentDetails.visionAmount cannot exceed amount |
| UNPROCESSABLE_ENTITY | 422 UNPROCESSABLE ENTITY | paymentDetails.prescriptionAmount cannot exceed paymentDetails.qualifiedAmount |
Error Details
Authorization Error
Access denied when attempting to save payment method using completed session403 FORBIDDEN
Access denied when attempting to save payment method using PAYMENT mode403 FORBIDDEN
Access denied when attempting to poll setup payment method using PAYMENT mode403 FORBIDDEN
Access denied when attempting to save payment method using cancelled session403 FORBIDDEN
Not allowed to access this session403 FORBIDDEN
Resource Not Found Error
Session Id not found404 NOT FOUND
Business Rule Violation Error
Card WS2 check has failed.400 BAD REQUEST
Your session has been canceled410 GONE
Your session is no longer valid401 UNAUTHORIZED
Not allowed to access this session403 FORBIDDEN
Schema validation error
Customer identifier is missing400 BAD REQUEST
Consent is required!400 BAD REQUEST
payment is required400 BAD REQUEST
Config Object
Invalid Request. Request parameter saveDisabled or paymentMethodSaveMode not supported in Mode: [modes]400 BAD REQUEST
Payment Method ID is required for mode - PAYMENT_METHOD_DISPLAY400 BAD REQUEST
Invalid request: 'saveDisabled' and 'paymentMethodSaveMode' cannot be used together. Use only 'paymentMethodSaveMode'.400 BAD REQUEST
config.merchant.name Merchant name contains invalid characters400 BAD REQUEST
config.merchant.name Merchant name must not be blank400 BAD REQUEST
config.merchant.name Merchant name must be less than or equal to 80 characters400 BAD REQUEST
Invalid mode400 BAD REQUEST
Invalid PaymentMethodChannel400 BAD REQUEST
Payment method type is not configured.400 BAD REQUEST
You have no capture methods available.400 BAD REQUEST
config.privacyPolicyUrl must be a valid URL400 BAD REQUEST
Session Mode not applicable for guest checkout!400 BAD REQUEST
Invalid card category type config.cardCategories.type400 BAD REQUEST
Maximum of 100 medications allowed in cardCategories[].medication400 BAD REQUEST
Medications cannot be empty in cardCategories[].medications400 BAD REQUEST
Category label cannot exceed 100 characters400 BAD REQUEST
Medication value cannot be empty and maximum allowed length is 100400 BAD REQUEST
Medication label cannot be empty and maximum allowed length is 100400 BAD REQUEST
Customer Object
customer object is required400
customer object must include at least one of customer.hsid, customer.enterpriseId, or customer.metadata400
customer.firstName cannot exceed 50 characters400
customer.lastName cannot exceed 50 characters400
customer.email must be a valid email address400
customer.email cannot exceed 120 characters400
customer.ssn must contain only digits and cannot exceed 4 characters400
customer.dateOfBirth must be a valid date in format YYYY-MM-DD400
customer.zip5 must be exactly 5 digits400
customer.phoneNumber.countryCode must contain only digits and must be 1 to 3 characters long400
customer.phoneNumber.number must contain only digits and must be 4-11 characters long400
customer.enterpriseIdentifier must contain only digits400
customer.hsid must be a valid UUID400
Payment Object
paymentId must be valid UUID400
amount is required400
amount must be an integer between 1 and 99999999400
amount must equal the sum of paymentAllocations[:].amount400
merchantTransactionId is required400
merchantTransactionId cannot exceed 50 characters400
description cannot exceed 100 characters400
statementDescriptorSuffix only allows alphanumeric, space, hyphen and dot, and must contain at least one letter400
statementDescriptorSuffix cannot exceed 10 characters400
metadata cannot exceed 20 entries400
metadata key cannot exceed 40 characters400
metadata value cannot exceed 100 characters400
paymentAllocations is required and must contain at least 2 items400
paymentAllocations cannot contain more than 2 items400
paymentAllocations[n].amount is required400
paymentAllocations[n].amount must be an integer between 1 and 99999999400
paymentAllocations[n].paymentMethodId is required400
paymentAllocations[n].paymentMethodId must be valid UUID400
Agent Object
agent.firstName cannot exceed 50 characters400
agent.lastName cannot exceed 50 characters400
agent.userId cannot exceed 50 characters400
agent.userId is required (move into business)400
Consent Object
consentCollectionDetails.merchantConsentText is required and cannot exceed 1000 characters400 BAD REQUEST
consentCollectionDetails.merchantConsentId is required and cannot exceed 100 characters400 BAD REQUEST
consentCollectionDetails.consentCollectionTimestamp is required and must be in ISO 8601 format400 BAD REQUEST
consentCollectionDetails is required when Collection Type is PPD400 BAD REQUEST
agent is required when Collection Type is TEL or PPD400 BAD REQUEST
Payment Details Object
paymentDetails.qualifiedAmount is required when paymentDetails is provided422 UNPROCESSABLE ENTITY
sum of paymentDetails.qualifiedAmount and paymentDetails.visionAmount cannot exceed amount422 UNPROCESSABLE ENTITY
paymentDetails.prescriptionAmount cannot exceed paymentDetails.qualifiedAmount422 UNPROCESSABLE ENTITY