Skip to main content
Version: v1

Payment Method Details Error Codes

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

Error Code Summary

Error Codes Summary

Nickname Validation

Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Nickname FormatPAYMENT_METHOD_ERROR400Nickname must be alphanumeric and up to 30 characters.Nickname contains special characters or is too longUse only letters and numbers for the nickname and keep it under 30 characters
Nickname Contains Account #PAYMENT_METHOD_ERROR400nickname shouldn't contain account numberNickname includes the bank account numberRemove any account numbers from the nickname field
Nickname Contains Card #PAYMENT_METHOD_ERROR400Please make sure that the nickname field doesn't contain a card number.Nickname includes a card numberRemove any card numbers from the nickname field

Bank Account Validation

Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Name Contains Account #PAYMENT_METHOD_ERROR400nameOnAccount shouldn't contain account numberName on account includes the account numberRemove any account numbers from the name on account field
Account Number FormatPAYMENT_METHOD_ERROR400accountNumber is not validAccount number contains non-digitsEnsure account number contains only numeric digits
Account Number LengthPAYMENT_METHOD_ERROR400accountNumber can be upto 17 digitsAccount number is longer than 17 digitsProvide an account number that is 17 digits or less
Required Account NumberPAYMENT_METHOD_ERROR400accountNumber is requiredAccount number is missingInclude a valid account number in the request
Valid Account TypePAYMENT_METHOD_ERROR400accountType is not validAccount type is not checking or savingsUse only 'checking' or 'savings' for account type
Required Account TypePAYMENT_METHOD_ERROR400accountType is requiredAccount type is missingInclude the account type (checking or savings) in the request
Bank Account Details RequiredPAYMENT_METHOD_ERROR400Bank Account details are neededBank account details missingProvide all required bank account details
Routing Number RequiredPAYMENT_METHOD_ERROR400routingNumber is requiredRouting number is missingInclude a valid routing number in the request
Routing Number FormatPAYMENT_METHOD_ERROR400routingNumber must be a 9 digit numberRouting number is not 9 digitsEnsure routing number is exactly 9 digits
Name on Account RequiredPAYMENT_METHOD_ERROR400Name on account is requiredName on account is missingInclude the name on account in the request
Invalid Payment Method TypePAYMENT_METHOD_ERROR400BANK_ACCOUNT type is not applicable for paymentMethod.typeBank account type used with cardUse consistent payment method types (don't mix card and bank account details)

Card Categories Validation

Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Medication Label ValidationPAYMENT_METHOD_ERROR400Medication label cannot be empty and maximum allowed length is 100Empty or too long medication label in cardCategoriesProvide a non-empty medication label under 100 characters
Medication Value ValidationPAYMENT_METHOD_ERROR400Medication value cannot be empty and maximum allowed length is 100Empty or too long medication value in cardCategoriesProvide a non-empty medication value under 100 characters
Invalid Card Category TypePAYMENT_METHOD_ERROR400Invalid card category typeUnsupported card category type in cardCategoriesSet Supported Card Category as per the merchant settings

Card Information Validation

Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Name on Card RequiredPAYMENT_METHOD_ERROR400Name on card must not be blank.Name on card is blankProvide a non-empty name on the card field
Card Number in Name FieldPAYMENT_METHOD_ERROR400Please make sure that the name field doesn't contain a card number.Name on card contains a card numberRemove any card numbers from the name on card field
Vendor Payment Method ID RequiredPAYMENT_METHOD_ERROR400vendorPaymentMethodId is requiredVendor payment method ID missingInclude the vendor payment method ID in the request

Payment Method Validation

Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Payment Method RequiredPAYMENT_METHOD_ERROR400paymentMethod is requiredPayment method is missingInclude the payment method object in the request
Payment Method Type RequiredPAYMENT_METHOD_ERROR400paymentMethod type is requiredPayment method type is missingSpecify a valid payment method type (e.g., "CARD" or "BANK_ACCOUNT")

Error Code Details

Nickname Validation

Nickname must be alphanumeric and up to 30 characters.

Validates that the nickname follows the required format: alphanumeric, up to 30 characters, no consecutive spaces.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"nameOnCard": "John Doe"
},
"nickname": "My Credit Card With Special Characters @#$%"
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Nickname must be alphanumeric and up to 30 characters."
}
Nickname shouldn't contain account number

Validates that the nickname doesn't contain the bank account number.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "987654321",
"routingNumber": "123456789",
"accountType": "checking",
"nameOnAccount": "John Doe"
},
"nickname": "My Account 987654321"
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "nickname shouldn't contain account number"
}
Please make sure that the nickname field doesn't contain a card number.

Validates that the nickname doesn't contain a card number.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"nameOnCard": "John Doe"
},
"nickname": "Visa 4111111111111111"
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Please make sure that the nickname field doesn't contain a card number."
}

Bank Account Validation

Name Contains Account Number

Validates that the name on account doesn't contain the account number.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "987654321",
"routingNumber": "123456789",
"accountType": "checking",
"nameOnAccount": "John Doe 987654321"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "nameOnAccount shouldn't contain account number"
}
Account Number Format

Validates that the account number contains only digits.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "ABC-123456",
"routingNumber": "123456789",
"accountType": "checking",
"nameOnAccount": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "accountNumber is not valid"
}
Account Number Length

Validates that the account number is not longer than 17 digits.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "123456789012345678",
"routingNumber": "123456789",
"accountType": "checking",
"nameOnAccount": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "accountNumber can be upto 17 digits"
}
Required Account Number

Validates that the account number is provided.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"routingNumber": "123456789",
"accountType": "checking",
"nameOnAccount": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "accountNumber is required"
}
Valid Account Type

Validates that the account type is either "checking" or "savings".

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "987654321",
"routingNumber": "123456789",
"accountType": "business",
"nameOnAccount": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "accountType is not valid"
}
Required Account Type

Validates that the account type is provided.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "987654321",
"routingNumber": "123456789",
"nameOnAccount": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "accountType is required"
}
Bank Account Details Required

Validates that bank account details are provided.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT"
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Bank Account details are needed"
}
Routing Number Required

Validates that the routing number is provided.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "987654321",
"accountType": "checking",
"nameOnAccount": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "routingNumber is required"
}
Routing Number Format

Validates that the routing number is exactly 9 digits.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "987654321",
"routingNumber": "12345678",
"accountType": "checking",
"nameOnAccount": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "routingNumber must be a 9 digit number"
}
Name on Account Required

Validates that the name on account is provided.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "987654321",
"routingNumber": "123456789",
"accountType": "checking"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Name on account is required"
}
Invalid Payment Method Type

Validates that bank account type is applicable for the payment method.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"accountNumber": "987654321",
"routingNumber": "123456789",
"accountType": "checking",
"nameOnAccount": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "BANK_ACCOUNT type is not applicable for paymentMethod.type"
}

Card Categories Validation

Medication Label Validation

Validates that when using cardCategories for manufacturer cards, the medication label must not be empty and cannot exceed 100 characters.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"nameOnCard": "John Doe"
},
"cardCategories": [
{
"type": "MANUFACTURER_CARD",
"medications": [
{
"label": "",
"value": "125mg"
}
]
}
]
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Medication label cannot be empty and maximum allowed length is 100"
}
Medication Value Validation

Validates that when using cardCategories for manufacturer cards, the medication value must not be empty and cannot exceed 100 characters.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"nameOnCard": "John Doe"
},
"cardCategories": [
{
"type": "MANUFACTURER_CARD",
"medications": [
{
"label": "Acetaminophen",
"value": ""
}
]
}
]
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Medication value cannot be empty and maximum allowed length is 100"
}
Invalid Card Category Type

Validates that the card category type must be valid. The only supported card category type is MANUFACTURER_CARD.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"nameOnCard": "John Doe"
},
"cardCategories": [
{
"type": "UNKNOWN_TYPE",
"medications": [
{
"label": "Acetaminophen",
"value": "125mg"
}
]
}
]
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Invalid card category type"
}

Card Information Validation

Name on Card Requirement

Validates that the name on card field is not blank.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"nameOnCard": ""
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 406,
"detail": "Name on card must not be blank."
}
Card Number in Name Field

Validates that the name field doesn't contain a card number.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"nameOnCard": "John Doe 4111111111111111"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 406,
"detail": "Please make sure that the name field doesn't contain a card number."
}
Vendor Payment Method ID Required

Validates that the vendor payment method ID is provided.

tip

Required only payment method type card

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"type": "CARD",
"paymentMethodDetails": {
"nameOnCard": "John Doe"
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 406,
"detail": "vendorPaymentMethodId is required"
}

Payment Method Validation

Payment Method Required

Validates that the payment method is provided.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 406,
"detail": "paymentMethod is required"
}
Payment Method Type Required

Validates that the payment method type is provided.

Sample Invalid Request:

{
"customer": {
"hsid": "123e4567-e89b-12d3-a456-426614174000"
},
"paymentMethod": {
"vendorPaymentMethodId": "pm_123456789"
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 406,
"detail": "paymentMethod type is required"
}