Skip to main content
Version: v1

SetUp Payment Method Error Codes

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

tip

Error Codes Summary

Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Reusing Vendor Payment MethodPAYMENT_METHOD_ERROR400 BAD REQUESTVendorPaymentMethodId cannot be reusedAttempting to save a payment method with a vendor payment method ID that's already in useUse a unique vendor payment method ID that hasn't been used before
Manufacturer Card ValidationPAYMENT_METHOD_ERROR400 BAD REQUESTManufacturer card cannot be defaultAttempting to set a manufacturer card as defaultSet either manufacturerCard=false or default=false, a manufacturer card cannot be the default payment method
PAYMENT_METHOD_ERROR400 BAD REQUESTAgent is required to add manufacturer cardMissing agent information for manufacturer card (applicable only when using manufacturerCard=true)Include complete agent information when setting up a manufacturer card
PAYMENT_METHOD_ERROR400 BAD REQUESTMedication is required to add manufacturer cardMissing medication in cardCategories for manufacturer cardInclude medication details in the cardCategories object for manufacturer cards
PAYMENT_METHOD_ERROR400 BAD REQUESTOnly one medication can be associated per manufacturer cardMore than one medication added to cardCategoriesLimit medication entries to one per manufacturer card
PAYMENT_METHOD_ERROR400 BAD REQUESTMANUFACTURER_CARD category type is not enabledIf merchant request for Manufacturer card catgories when not configured in merchant settingsContact support to enable manufacturer card category types for your merchant account
Maximum Retries ReachedNOT_ACCEPTABLE406 NOT ACCEPTABLEMaximum number of retries reached.When the maximum number of payment setup retry attempts has been reachedCreate a new payment setup attempt or contact support for assistance

Error Codes Details

Reusing Vendor Payment Method

Duplicate vendor payment method

VendorPaymentMethodId Cannot Be Reused

The system prevents duplicate vendor payment method IDs in the database through a unique constraint.

Sample Invalid Request:

{
"paymentMethod": {
"vendorPaymentMethodId": "pm_already_exists_123",
"paymentMethodDetails": {
"type": "CARD",
"nameOnCard": "John Doe",
"manufacturerCard": false
}
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "VendorPaymentMethodId cannot be reused"
}

Manufacturer Card Validation

Default Payment Method Restriction

Manufacturer card cannot be default.

Sample Invalid Request using manufacturer flag:
{
"paymentMethod": {
"paymentMethodDetails": {
"type": "CARD",
"nameOnCard": "John Doe",
"manufacturerCard": true
},
"isDefault": true
}
}
Sample Invalid Request using card categories object:
{
"paymentMethod": {
"paymentMethodDetails": {
"type": "CARD",
"nameOnCard": "John Doe",
"cardCategories": [
{
"type" : "MANUFACTURER_CARD",
"medications" : [ {
"label" : "DrugName",
"value" : "24mg"
}]
}
]
},
"isDefault": true
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Manufacturer card cannot be default"
}

Agent Information Required

Agent Information Required

Agent is required to add manufacturer card. This validation applies only when using the legacy manufacturerCard: true approach and is not required when using the new cardCategories object.

Sample Invalid Request:

{
"paymentMethod": {
"paymentMethodDetails": {
"type": "CARD",
"nameOnCard": "John Doe",
"manufacturerCard": true
},
"isDefault": false
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Agent is required to add manufacturer card"
}

Missing Medication

Missing Medication

When setting up a manufacturer card using cardCategories, at least one medication must be specified.

Sample Invalid Request:

{
"paymentMethod": {
"paymentMethodDetails": {
"type": "CARD",
"nameOnCard": "John Doe",
"cardCategories": [
{
"type": "MANUFACTURER_CARD",
"medications": []
}
]
},
"isDefault": false
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Medication is required to add manufacturer card"
}

Multiple Medication

Multiple Medications

Only one medication can be associated with a manufacturer card.

Sample Invalid Request:

{
"paymentMethod": {
"paymentMethodDetails": {
"type": "CARD",
"nameOnCard": "John Doe",
"cardCategories": [
{
"type": "MANUFACTURER_CARD",
"medications": [
{
"label": "Acetaminophen",
"value": "125mg"
},
{
"label": "Ibuprofen",
"value": "200mg"
}
]
}
]
},
"isDefault": false
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "Only one medication can be associated per manufacturer card"
}

Manufacturer Card not Configured

Manufacturer Card not Configured

When manufacturer card categories is requested and merchant is not configured

Sample Invalid Request:

{
"paymentMethod": {
"paymentMethodDetails": {
"type": "CARD",
"cardCategories": [
{
"type": "MANUFACTURER_CARD",
"medications": [
{
// medication list
}
]
}
]
},
"isDefault": false
}
}

Sample Error Response:

{
"title": "PAYMENT_METHOD_ERROR",
"status": 400,
"detail": "MANUFACTURER_CARD category type is not enabled"
}

Maximum Retries Reached

Maximum number of retries reached.

The system limits the number of retry attempts when setting up a payment method using requestId. This error occurs when the maximum allowed number of retry attempts has been reached.

Sample Response:

{
"title": "NOT_ACCEPTABLE",
"status": 406,
"detail": "Maximum number of retries reached."
}