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
- For Payment Details IIAS overview, see the IIAS Payments
Error Codes Summary
Error Code Summary
| Error Category | Error Title Reference | Error Title | HTTP Status | Error Message |
|---|---|---|---|---|
| CCG Schema Validation | Payment Details Validation | INVALID_REQUEST | 400 BAD REQUEST | paymentDetails.healthcare.iias.qualifiedAmount is required |
| CCG Schema Validation | Qualified + Vision Amount Exceeds Total Amount | INVALID_REQUEST | 400 BAD REQUEST | sum of qualifiedAmount and visionAmount cannot exceed amount |
| CCG Schema Validation | Prescription Amount Exceeds Qualified Amount | INVALID_REQUEST | 400 BAD REQUEST | prescriptionAmount cannot exceed qualifiedAmount |
Error Codes Details
Payment Details Validation
Qualified Amount is either missing or explicitly set to null in the paymentDetails object
Details:
- Scenario: QualifiedAmount is not passed in Payments Object
- Resolution: Include a valid qualified amount in the payment details
- API Endpoints:
/v2/payments - Scopes:
merchant,user
Sample Request
{
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": null,
"qualifiedAmountDetails": {
"prescriptionAmount": 100
}
},
"visionAmount": 400
}
},
"metadata": {},
"partialAuthorization": false
}
Sample Response
{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "paymentDetails.healthcare.iias.qualifiedAmount is required"
}
Qualified + Vision Amount Exceeds Total Amount
Sum of the Qualified Amount and Vision amount must not exceed the Total Amount
Details:
- Scenario: When the sum of qualified amount and vision amount exceeds the total amount
- Resolution: Ensure the sum of qualified and vision amounts is less than or equal to the total amount
- API Endpoints:
/v2/payments - Scopes:
merchant,user
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": "sum of qualifiedAmount and visionAmount cannot exceed amount"
}
Prescription Amount Exceeds Qualified Amount
Prescription Amount must not exceed the Qualified Amount
Details:
- Scenario: When prescription amount is greater than qualified amount
- Resolution: Ensure prescription amount is less than or equal to qualified amount
- API Endpoints:
/v2/payments - Scopes:
merchant,user
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": "prescriptionAmount cannot exceed qualifiedAmount"
}