IIAS Payments β Computation Examples & Response Reference
When to use this page
Verifying an IIAS proration calculation against a worked example, or looking up the response shape. For the distribution formula and rules, see IIAS Payments.
Example IIAS Computationsβ
Example 1: Equal Distribution of Payment Allocations
// merchant/user provided paymentAllocation amount(s)
paymentAllocation1_amount = 300; paymentAllocation2_amount = 300
// merchant provided IIAS info
qualifiedAmount = 400, prescriptionAmount = 100, visionAmount = 200
// compute total amount
totalAmount = 300 + 300 = 600
// compute splitRatio
splitRatio = 300 / 600 = 0.5
// compute IIAS for paymentAllocation1
paymentAllocation1_QA = round(400 * 0.5) = 200
paymentAllocation1_PA = round(100 * 0.5) = 50
paymentAllocation1_VA = round(200 * 0.5) = 100
// compute IIAS for paymentAllocation2
paymentAllocation2_QA = 400 - 200 = 200
paymentAllocation2_PA = 100 - 50 = 50
paymentAllocation2_VA = 200 - 100 = 100
Example 2: Equal Distribution of qualifiedAmount & visionAmount
// merchant/user provided paymentAllocation amount(s)
paymentAllocation1_amount = 471; paymentAllocation2_amount = 529
// merchant provided IIAS info
qualifiedAmount = 500, prescriptionAmount = 400, visionAmount = 500
// compute total amount
totalAmount = 471 + 529 = 1000
// compute splitRatio
splitRatio = 471 / 1000 = 0.471
// compute IIAS for paymentAllocation1
paymentAllocation1_QA = round(500 * 0.471) = 236
paymentAllocation1_PA = round(400 * 0.471) = 188
paymentAllocation1_VA = 471 - 236 = 235
// compute IIAS for paymentAllocation2
paymentAllocation2_QA = 500 - 236 = 264
paymentAllocation2_PA = 400 - 188 = 212
paymentAllocation2_VA = 500 - 235 = 265
Example 3: Without Vision Amount
// merchant/user provided paymentAllocation amount(s)
paymentAllocation1_amount = 330; paymentAllocation2_amount = 400
// merchant provided IIAS info
qualifiedAmount = 550, prescriptionAmount = 321, visionAmount = 0
// compute total amount
totalAmount = 330 + 400 = 730
// compute splitRatio
splitRatio = 330 / 730 = 0.45205479
// compute IIAS for paymentAllocation1
paymentAllocation1_QA = round(550 * 0.45205479) = 249
paymentAllocation1_PA = round(321 * 0.45205479) = 145
paymentAllocation1_VA = round(0 * 0.45205479) = 0
// compute IIAS for paymentAllocation2
paymentAllocation2_QA = 550 - 249 = 301
paymentAllocation2_PA = 321 - 145 = 176
paymentAllocation2_VA = 0 - 0 = 0
Example 4: Big Ratio Difference
// merchant/user provided paymentAllocation amount(s)
paymentAllocation1_amount = 119; paymentAllocation2_amount = 3
// merchant provided IIAS info
qualifiedAmount = 111, prescriptionAmount = 87, visionAmount = 11
// compute total amount
totalAmount = 119 + 3 = 122
// compute splitRatio
splitRatio = 119 / 122 = 0.97540984
// compute IIAS for paymentAllocation1
paymentAllocation1_QA = round(111 * 0.97540984) = 108
paymentAllocation1_PA = round(87 * 0.97540984) = 85
paymentAllocation1_VA = round(11 * 0.97540984) = 11
// compute IIAS for paymentAllocation2
paymentAllocation2_QA = 111 - 108 = 3
paymentAllocation2_PA = 87 - 85 = 2
paymentAllocation2_VA = 11 - 11 = 0
Example 5: Both Round Up Overflow By +1
// merchant/user provided paymentAllocation amount(s)
paymentAllocation1_amount = 50; paymentAllocation2_amount = 50
// merchant provided IIAS info
qualifiedAmount = 51, prescriptionAmount = 30, visionAmount = 49
// compute total amount
totalAmount = 50 + 50 = 100
// compute splitRatio
splitRatio = 50 / 100 = 0.5
// compute IIAS for paymentAllocation1
paymentAllocation1_QA = round(51 * 0.5) = 26
paymentAllocation1_PA = round(30 * 0.5) = 15
paymentAllocation1_VA = round(49 * 0.5) = 25
// compute IIAS for paymentAllocation2
paymentAllocation2_QA = 51 - 26 = 25
paymentAllocation2_PA = 30 - 15 = 15
paymentAllocation2_VA = 49 - 25 = 24
Example 6: Very Small Amount
// merchant/user provided paymentAllocation amount(s)
paymentAllocation1_amount = 1; paymentAllocation2_amount = 1
// merchant provided IIAS info
qualifiedAmount = 1, prescriptionAmount = 0, visionAmount = 1
// compute total amount
totalAmount = 1 + 1 = 2
// compute splitRatio
splitRatio = 1 / 2 = 0.5
// compute IIAS for paymentAllocation1
paymentAllocation1_QA = round(1 * 0.5) = 1
paymentAllocation1_PA = round(0 * 0.5) = 0
paymentAllocation1_VA = round(1 * 0.5) = 1
// compute IIAS for paymentAllocation2
paymentAllocation2_QA = 1 - 1 = 0
paymentAllocation2_PA = 0 - 0 = 0
paymentAllocation2_VA = 1 - 1 = 0
Payment Response for IIAS Paymentsβ
For split payments, the API response includes IIAS details at two levels:
- Top-level
paymentDetails: Contains the original IIAS amounts provided by the merchant paymentAllocations[].paymentDetails: Contains the distributed IIAS amounts calculated for each payment allocation
This structure allows you to verify that the merchant's IIAS specification was properly distributed across multiple payment methods.
Sample Single Card Payment Response with IIAS Details
{
"url": "/v2/payments/a2222db7-5c10-4e78-bed6-72b2c6b222a8",
"data": {
"id": "a2222db7-5c10-4e78-bed6-72b2c6b222a8",
"amount": 1000,
"description": "V2 PaymentDetails Split Tender",
"merchantTransactionId": "b4259207-b52e-4e53-a2a7-1f6d9cadb1234",
"status": "COMPLETED",
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": 400,
"qualifiedAmountDetails": {
"prescriptionAmount": 100
}
},
"visionAmount": 400
}
},
"paymentAllocations": [
{
"id": "73e4a9c0-0d9b-2222-b1f4-d789c050a53c",
"amount": 1000,
"status": "COMPLETED",
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": 400,
"qualifiedAmountDetails": {
"prescriptionAmount": 100
}
},
"visionAmount": 400
}
}
}
]
}
}
Sample Split Payment (Card + Card) Response with IIAS Details
{
"url": "/v2/payments/a2222db7-5c10-4e78-bed6-72b2c6b222a8",
"data": {
"id": "a2222db7-5c10-4e78-bed6-72b2c6b222a8",
"amount": 2000,
"description": "V2 PaymentDetails Split Tender",
"merchantTransactionId": "b4259207-b52e-4e53-a2a7-1f6d9cadb1234",
"status": "COMPLETED",
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": 777,
"qualifiedAmountDetails": {
"prescriptionAmount": 33
}
},
"visionAmount": 113
}
},
"paymentAllocations": [
{
"id": "73e4a9c0-0d9b-2222-b1f4-d789c050a53c",
"amount": 1000,
"status": "COMPLETED",
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": 389,
"qualifiedAmountDetails": {
"prescriptionAmount": 17
}
},
"visionAmount": 57
}
}
},
{
"id": "66e41111-cc68-423f-939f-efbff36e1111",
"amount": 1000,
"status": "COMPLETED",
"paymentDetails": {
"healthcare": {
"iias": {
"qualifiedAmount": 388,
"qualifiedAmountDetails": {
"prescriptionAmount": 16
}
},
"visionAmount": 56
}
}
}
]
}
}