Transaction/CancelOrRefund Web Service
The Transaction/CancelOrRefund REST web service allows you to cancel a transaction or make a refund (total or partial if the buyer supports it).
Whether to cancel or refund depends on the status of the transaction.
STATUS | Cancel | Refund |
---|---|---|
Transaction en cours (non remisée) | Oui | No |
Transaction remisée | Non | YES |
For more info: Cancel / refund a transaction.
I.Annuler
- Status of a transaction to be canceled:
- AUTHORISED_TO_VALIDATE(To be validated)
- WAITING_AUTHORISATION_TO_VALIDATE(To be validated and authorized)
- WAITING_AUTHORISATION(Waiting for authorization)
- AUTHORISED(Waiting for capture)
More info, Transaction lifecycle.
Partial cancellation: use the Transaction/Update Web Service to edit the transaction amount.
Complete cancellation : use the Transaction/CancelOrRefund Web Service to cancel a transaction.
II. Refund
- Status of a transaction to be refunded:
- CAPTURED(Présented)
You can use the "Transaction/Get " Web Service to find out the status of the transaction in real time.
Refund partial :
- Use the Transaction/CancelOrRefund Web Service and transmit an amount that is lower than the transaction amount.
- You can partially refund a transaction several times, until it is fully refunded.
Refund total :
- Use the Transaction/CancelOrRefund Web Service and transmit an amount equal to the transaction amount.
Case of chargebacks : Any attempt of refunding an unpaid transaction will be rejected.
Cases of refund refusal :
. For example, if the refund request is made for a card that has been blocked, the code and reason for refusal will be "59: suspicion of fraud" for some acquirers.
See the list of specific return codes specific to the CB network for more details.
Request parameters
uuid
Unique transaction ID generated by the payment gateway.
Format
amount
Payment amount in its smallest currency unit (cent for euro).
Example: 30050 for EUR 300.50.
Format
currency
Payment currency. Alphabetic code in uppercase according to alpha-3 (ISO 4217).
Eg: "EUR" for the euro.
Format
Possible values
The possible values are:
Currency | ISO 4217 ENCODING | Fractional unit |
---|---|---|
Australian dollar (036) | AUD | 2 |
Canadian dollar (124) | CAD | 2 |
Swiss franc (756) | CHF | 2 |
Danish crown (208) | DKK | 2 |
Euro (978) | EUR | 2 |
Pound Sterling (826) | GBP | 2 |
Japanese yen (392) | JPY | 0 |
Norwegian crown (578) | NOK | 2 |
Swedish krona (752) | SEK | 2 |
US dollar (840) | USD | 2 |
resolutionMode
A transaction can be authorized and waiting for capture in the bank, or captured in the bank. Depending on the capture status, several operations are possible:
If the transaction is waiting for capture:
In this case, it is possible to cancel the transaction. The capture in the bank will not take place. The new transaction statuses are:
status | UNPAID |
detailedStatus | CANCELLED |
If the transaction is captured:
In this case, it is no longer possible to cancel the transaction.
You must create a new refund transaction.
What Transaction/CancelOrRefund really does:
the REST Web Service Transaction/CancelOrRefund chooses which operation to perform automatically.
However, it is possible to force the type of operation thanks to the resolutionMode parameter.
If the field is sent empty, the default value will be AUTO.
Possible values
The possible values are:
value | Description | Cancel | Refund |
---|---|---|---|
AUTO | Effectue automatiquement une annulation ou un remboursement (valeur by default). | Yes "*" | Yes "*" |
CANCELLATION_ONLY | Effectue une annulation. Si la transaction est remisée, une erreur est retournée. | YES | No |
REFUND_ONLY | Effectue un remboursement. Si la transaction n'est pas remisée, une erreur est retournée. | No | YES |
"*" according to transaction status:
- The transaction is waiting for capture: cancellation.
- Captured transactions: refund.
For more information on the concept of capture, see the article Canceling/refunding a transaction.
Format
comment
Public comment.
Format
manualValidation
Path: transactionOptions.cardOptions.manualValidation
Transaction validation mode.
Format
Possible values
The possible values are:
value | Description |
---|---|
NO | Validation automatique par la plateforme de paiement. |
YES | Validation manuelle par le marchand. |
null | Configuration par défaut de la boutique retenue (paramétrable dans le |
captureDelay
Path: transactionOptions.cardOptions.captureDelay
Delay to be applied to the capture date.
Description
Indicates the delay (in days) before the capture.
If this parameter is not passed, then the default value set in the
It can be set in the
If the capture delay is higher than 365 days in the payment request, it will be automatically reset to 365 days.
Format
mid
MID number used for refunding a proximity transaction. If this field is filled in, make sure you use the correct VADS contract based on the card network.
Format
Response reference
The web service returns the following object:
Response | Context |
---|---|
Transaction | Object containing transaction details. |
See response reference for more information.