Skip to main content
Version: v2

Payment Details Object Error Codes

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

Quick Reference

Error Codes Summary

Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Payment Details Validation
Payment Details Not ValidINVALID_REQUEST400 BAD REQUESTpayment details are not validWhen Qualified Amount is either missing or nullInclude a valid qualified amount in the payment details
Qualified + Vision Amount Exceeds Total AmountINVALID_REQUEST400 BAD REQUESTdetails qualified amount + vision amount cannot be greater than amountWhen the sum of qualified amount and vision amount exceeds the total amountEnsure the sum of qualified and vision amounts is less than or equal to the total amount
Prescription Amount Exceeds Qualified AmountINVALID_REQUEST400 BAD REQUESTdetails prescription amount cannot be greater than qualified amountWhen prescription amount is greater than qualified amountEnsure prescription amount is less than or equal to qualified amount

Error Codes Details

Payment Details Validation

Qualified Amount is either missing or explicitly set to null in the paymentDetails object

Scenario: QualifiedAmount is not passed in Payments Object

Sample Request:

{
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": null,
"qualifiedAmountDetails": {
"prescriptionAmount": 100
}
},
"visionAmount": 400
}
},
"metadata": {},
"partialAuthorization": false
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "payment details are not valid"
}
Sum of the Qualified Amount and Vision amount must not exceed the Total Amount

Scenario: When the sum of qualified amount and vision amount exceeds the total amount

Sample Request:

{
"payment": {
"amount": 1000,
"merchantTransactionId": "txn123456",
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": 800
},
"visionAmount": 300
}
}
},
"customer": {
"email": "test@example.com"
}
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "details qualified amount + vision amount cannot be greater than amount"
}
Prescription Amount must not exceed the Qualified Amount

Scenario: When prescription amount is greater than qualified amount

Sample Request:

{
"payment": {
"amount": 1000,
"merchantTransactionId": "txn123456",
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": 500
},
"prescriptionAmount": 600
}
}
},
"customer": {
"email": "test@example.com"
}
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "details prescription amount cannot be greater than qualified amount"
}