Use Payment Connector for surcharging
Retrieve transaction information
Payment responses that the Clover device returns provide detailed transaction data for your application to use and display.
Understand credit card surcharge
View surcharge for transactions
To display transaction data in your app, you need to use data from different fields. The surcharge data for a transaction is reported in the PaymentResponse.payment.additionalCharges object, where PaymentResponse is one of the following—SaleResponse, AuthResponse, or PreAuthResponse.
Request
{
"success": true,
"result": "SUCCESS",
"payment": {
"id": "WSPDBEE2RKSEA",
"result": "SUCCESS",
"order": {
"id": "88KCNJ7CS3JN4"
},
"amount": 2428,
"createdTime": 1599672721991,
"additionalCharges": {
"elements": [
{
"amount": 84,
"type": "CREDIT_SURCHARGE",
"id": "AGPT72N3N5TDM",
"rate": 35000,
"payment": {"id": "WSPDBEE2RKSEA"}
}
]
}
},
"isSale": true
}Response
The response includes an additionalCharges object with the following information:
| Response fields | Description |
|---|---|
amount | Amount page in cents as a surcharge on the credit card transaction. |
rate | Percentage of the total used to calculate the amount multiplied by 10000.Example: A 3.5% rate displays as 35000. |
type | Additional charge processed for the transaction. Values:
|
payment | Universal unique identifier (UUID) of the associated payment. |
The total amount paid by the customer is the sum of the payment amount and additionalCharges.amount. In the example, the customer is charged $25.12, that is the $24.28 amount plus a 3.5% surcharge of $0.84.
View surcharge for a refund and void
The surcharge data for a transaction is reported in the RefundPaymentResponse.refund.additionalCharges or VoidPaymentResponse.payment.additionalCharges object.
Request
{
"success": true,
"result": "SUCCESS",
"reason": "voidSent",
"message": "No extended information provided.",
"payment": {
"id": "SPLHGTD25ALN4",
"order": {
"id": "N70SW8KUW28VY"
},
"amount": 2130,
"tipAmount": 0,
"taxAmount": 0,
"result": "SUCCESS",
"additionalCharges": [
{
"amount": 74,
"type": "CREDIT_SURCHARGE",
"id": "KHGT70N3N5SSD",
"rate": 35000,
"payment": {"id": "SPLHGTD25ALN4"}
}
]
}
}Response
The response includes an additionalCharges object with the following information:
| Response | Description |
|---|---|
amount | Surcharge amount in cents that is refunded or voided. |
rate | Decimal percentage of the total used to calculate the amount. |
type | Charge type added to the original payment. Values:
|
payment | Universal unique identifier (UUID) of the associated payment. |
Updated 4 days ago
