Skip to main content
Version: v2

Agent Object Error Codes

This document provides a comprehensive reference for validation errors related to the agent object in the Convenient Checkout API. These errors help identify issues with agent data in API requests and guide you in resolving them.

Quick Reference to Related Error Codes

Error Codes Summary

Error Code Summary
Error CategoryError Title ReferenceError TitleHTTP StatusError Message
CCG Schema ValidationFirst Name ValidationINVALID_REQUEST400 BAD REQUESTagent.firstName cannot exceed 50 characters
CCG Schema ValidationLast Name ValidationINVALID_REQUEST400 BAD REQUESTagent.lastName cannot exceed 50 characters
CCG Schema ValidationUser ID ValidationINVALID_REQUEST400 BAD REQUESTagent.userId is required

Error Codes Details

First Name Validation

Character Limit Exceeded

Details:

  • Scenario: The agent's first name cannot exceed 50 characters.
  • Resolution: Ensure the agent's first name is 50 characters or less
  • API Endpoints: /v2/payments v2/sessions
  • Scopes: merchant, user
Sample Request
{
"agent": {
"firstName": "ThisFirstNameExceedsFiftyCharactersAndWillTriggerAnError",
"lastName": "Smith",
"userId": "msid123"
}
}
Sample Response
{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "agent.firstName cannot exceed 50 characters"
}

Last Name Validation

Character Limit Exceeded

Details:

  • Scenario: The agent's last name cannot exceed 50 characters.
  • Resolution: Ensure the agent's last name is 50 characters or less
  • API Endpoints: /v2/payments v2/sessions
  • Scopes: merchant, user
Sample Request
{
"agent": {
"firstName": "John",
"lastName": "ThisLastNameExceedsFiftyCharactersAndWillTriggerAnError",
"userId": "msid123"
}
}
Sample Response
{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "agent.lastName cannot exceed 50 characters"
}

User ID Validation

User ID Required

Details:

  • Scenario: The agent's user ID is required if the agent object is included in any API request.
  • Resolution: Include a valid agent.userId in the request when the agent object is provided
  • API Endpoints: /v2/payments v2/sessions
  • Scopes: merchant, user
Sample Request
{
"agent": {
"firstName": "John",
"lastName": "Smith"
// userId is missing
}
}
Sample Response
{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "agent.userId is required"
}