Calculate Convenience Fee
POST
/api/v1/feesCalculate the convenience fee for a payment against an order based on the payment method and amount.
Requires
Bearer token. Get token →Header Parameters
| Field | Details |
|---|---|
Request-Timestampstringdate-time | ISO 8601 UTC timestamp of the request. Used for idempotency and audit. |
Request-IDstring | Use a global unique identifier [GUID] for the request. Constraints Minimum length: 1 characterMaximum length: 50 characters |
Request Bodyrequired
| Field | Details |
|---|---|
amountobjectrequired2 nested fields | Monetary amount with currency. |
payment_methodstringrequired | Payment method for fee calculation. |
network_typestring | Card network type for more specific fee calculation. |
Response
| Field | Details |
|---|---|
dataobject[]6 nested fields | Array of convenience fee results per payment method/network combination. |
payment_methodstring | Payment method. |
fee_typestring | Type of fee calculation. |
amountobject2 nested fields | Monetary amount with currency. |
convenience_fee_breakdownobject5 nested fields | Breakdown of the convenience fee. |
payable_amountobject2 nested fields | Monetary amount with currency. |
payment_method_metadataobject2 nested fields | Metadata about the payment method. |
Status Codes
200 | Convenience fee calculated successfully. |
400 | The request was malformed or missing required fields. |
401 | Authentication failed — missing, expired, or invalid Bearer token. |
422 | Unprocessable entity. |
500 | An unexpected error occurred on the server. |
Request
curl --request POST \
--url https://pluraluat.v2.pinepg.in/api/v1/fees \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Request-ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Request-Timestamp: 2024-10-01T10:30:00Z' \
--data '{
"amount": {
"value": 50000,
"currency": "INR"
},
"payment_method": "CARD",
"network_type": "VISA"
}'{
"data": [
{
"payment_method": "CARD",
"fee_type": "PERCENTAGE",
"amount": {
"value": 50000,
"currency": "INR"
},
"convenience_fee_breakdown": {
"fee_amount": {
"value": 50000,
"currency": "INR"
},
"tax_amount": {
"value": 50000,
"currency": "INR"
},
"additional_fee_amount": {
"value": 50000,
"currency": "INR"
},
"maximum_fee_amount": {
"value": 50000,
"currency": "INR"
},
"applicable_fee_amount": {
"value": 50000,
"currency": "INR"
}
},
"payable_amount": {
"value": 50000,
"currency": "INR"
},
"payment_method_metadata": {
"network_type": "VISA",
"card_type": "CREDIT"
}
}
]
}