POST Api/Payment/CalculateFeeRefund
Calculate the applicable fees for a refund.
Request Information
URI Parameters
None.
Body Parameters
APIPaymentReversalModel| Name | Description | Type | Additional information |
|---|---|---|---|
| CustomerToken |
For consumer payment reversal requests, contains the unique customer token used to identify the customer performing the reversal. |
string |
None. |
| InvoiceReversals |
Specifies the specific amounts to be refunded per invoice for multi-invoice partial refunds. Omit for cancellations or full refunds. |
Collection of PaymentReversalRequestInvoiceModel |
None. |
| OriginalPaymentAmount |
Specifies the original amount of the payment to be reversed. Used to verify the lookup. |
decimal |
Required |
| OriginalPaymentProcessDate |
Specifies the original payment's processing date. Used to verify the lookup. |
date-time |
Required |
| Partial |
If the refund is a partial amount, set to true. Otherwise should be false or omitted. |
boolean |
None. |
| pcOptionalDate |
OptionalDate field - additional information required for some of the Payment Consolidator Reversal Reason codes |
date-time? |
Data type: Date |
| pcReversalReasonID |
Payment Consolidator ReversalReasonID |
int? |
None. |
| ReversalAmount |
Specifies the partial amount to be refunded. Omit for cancellations, full refunds or multi-invoice partial refunds. |
decimal? |
None. |
| ReversalComment |
Specifies the description for a refund. Omit for cancellations. |
string |
String length: inclusive between 0 and 100 |
| TransactionID |
Specifies the transaction ID of the payment to be reversed. |
long |
Required |
Request Formats
application/json, text/json
{
"CustomerToken": "sample string 1",
"InvoiceReversals": [
{
"InvoicePaymentID": 1,
"ReversalAmount": 2.0
},
{
"InvoicePaymentID": 1,
"ReversalAmount": 2.0
}
],
"OriginalPaymentAmount": 2.0,
"OriginalPaymentProcessDate": "2025-11-06T15:47:20.1218167Z",
"Partial": true,
"ReversalAmount": 1.0,
"ReversalComment": "sample string 5",
"TransactionID": 6,
"pcReversalReasonID": 1,
"pcOptionalDate": "2025-11-06T15:47:20.1218167Z"
}
Response Information
Resource Description
Calculate the applicable fees for a refund.
APIPaymentRefundFeeResponseModel| Name | Description | Type | Additional information |
|---|---|---|---|
| ErrorCode |
Name of the error condition. See ErrorCode model for details. |
ErrorCode |
None. |
| ErrorID |
Internal error identification number that uniquely identifies this specific error that occurred. |
string |
None. |
| ErrorNum |
Numeric value of the ErrorCode |
int |
None. |
| Errors |
List of errors that occurred when placing the payment |
Collection of string |
None. |
| FeeTotal |
Calculated Surcharge Amount |
decimal |
None. |
| GrandTotal |
PaymentTotal + FeeTotal |
decimal |
None. |
| PaymentTotal |
Sum of Invoice Principal Payment Amounts |
decimal |
None. |
| ProcessingType |
Indicator for Combined, Separate or Mixed Fee processing. See ProcessingType model for details. |
ProcessingType |
None. |
| RefundAmount |
Requested Refund Amount |
decimal |
None. |
| RefundFeeAmount |
Calculated Refund Fee Amount |
decimal |
None. |
| Success |
Indicates sucess or failure of the REST request. |
boolean |
None. |
Response Formats
application/json, text/json
{
"RefundFeeAmount": 1.0,
"RefundAmount": 2.0,
"ErrorCode": "None",
"ErrorID": "sample string 3",
"ErrorNum": 0,
"Errors": [
"sample string 1",
"sample string 2"
],
"FeeTotal": 4.0,
"GrandTotal": 5.0,
"PaymentTotal": 6.0,
"ProcessingType": "Combined",
"Success": true
}