INTEGRATION
TRANSACTION ASSURANCE
CHARGES
DISPUTES & FRAUD
Cancel, Refund or Reverse Charges
Four different endpoints can be used to cancel or refund a charge. The endpoint depends on the use case and the charging mode of the charge: Cancel, Refund, Cancel or Refund, or Reverse.
Auto Clearing Mode
When the clearingMode is set to auto
, the following endpoints can be used:
Cancelling a Charge
The Cancel Charge endpoint will cancel the referenced charge. This means clearing the referenced charge will be canceled, and a reversal request for the original authorization will be sent. If the charge is cleared, this endpoint will return an HTTP 409 error with type
set to /silverflow/problems/charge/clearing-already-submitted. When the referenced charge was created with the clearAfter
property, the charge can be canceled up until the timestamp specified. The endpoint only supports canceling the total charge amount; no partial amounts are allowed. See the example request:
Restrictions: It can only be used for charges with clearingMode set to auto and only supports canceling the full charge amount; partial amounts are not allowed.
Refunding a Charge
The Refund Charge endpoint refunds the referenced charge. It supports full or partial refunds. It can not be used if the intent
of the original charge is refund
. Note that it does not check whether or not the referenced charge has been cleared already. One can use the Cancel Charge endpoint first, and if a 409 with /silverflow/problems/charge/clearing-already-submitted is returned, then call the refund endpoint instead to refund the charge. Example request:
The snippet above refunds the referenced charge for the declared refundAmount
. Clearing of the charge is not affected. The refundAmount
can be used for partial refunds; if omitted, the total amount will be refunded. Here is an example response:
Restrictions: These cannot be used if the
intent
of the original charge isrefund
.
Please be aware that there is no validation of whether or not the referenced charge has already been cleared.
Cancel or Refund a Charge
The Cancel or Refund Charge endpoint will cancel or refund the referenced charge. When a request is sent, it will first check if the charge has been cleared. If not, the charge will be canceled. If the charge has already been cleared, it will be refunded instead. This endpoint only supports canceling or refunding the total charge amount; no partial amounts are supported. Example response:
Restrictions: This endpoint does not support canceling or refunding of POS charges. It can only be used for charges with
clearingMode
set toauto
and can only cancel or refund the total charge amount. No partial amounts are allowed.
Manual Clearing Mode
When the clearingMode
is set to manual,
the following endpoints can be used:
Reverse a Charge
The Reverse Charge endpoint will reverse the authorization of the referenced charge. It supports full and partial reversals. It does not check if the charge has been partially or fully cleared. If the charge has already been cleared, this endpoint should not be used; instead, the Refund Charge endpoint should be used. Example request:
This endpoint will only send a 04xx ISO 8583 reversal message for the original authorization. The clearing status remains unchanged. Note that for this endpoint, the client can provide the replacementAmount
. The replacementAmount
will replace the original authorization amount; it is not the amount that will be reversed. If not specified, the total charge amount will be reversed. See the example response:
Restrictions: Can only be used for charges with
clearingMode
set tomanual
.
A reversal will not appear in the settlement details since no clearing record has been submitted.
Unreferenced Refunds
It is possible to perform a refund without referencing a charge. For unreferenced refunds, you can use the Create Charge endpoint with the intent refund.