support
Back to documentation
Search
Categories
Tags
main parametersexpand all
uuid
required
general transaction options
amount
currency
resolutionMode
comment
card related options
transactionOptions
cardOptions
manualValidation
captureDelay
mid
Try me
Documentation

Transaction/CancelOrRefund Web Service

POSThttps://api.systempay.fr/api-payment/V4/Transaction/CancelOrRefund

The Transaction/CancelOrRefund REST web service allows you to cancel a transaction entirely or make a refund (total or partial if the buyer supports it).

A full reversal will be performed if the transaction status is one of the following:

  • AUTHORISED_TO_VALIDATE
  • WAITING_AUTHORISATION_TO_VALIDATE
  • WAITING_AUTHORISATION
  • AUTHORISED

If detailedStatus is equal to CAPTURED, the operation will be a refund. In this case, if the amount transmitted in the query is equal to the amount of the transaction, the refund will be full. If the transmitted amount is lower than the transaction amount, the refund will be partial.

You can partially refund a transaction several times, until it is fully refunded.

Case of chargebacks: Any attempt of refunding an unpaid transaction will be rejected.

Case of partial cancellation

Use the Transaction/Update web service if you want to change the amount of a transaction that has one of the following statuses:

  • AUTHORISED_TO_VALIDATE
  • WAITING_AUTHORISATION_TO_VALIDATE
  • WAITING_AUTHORISATION
  • AUTHORISED

For more information on statuses, see the following article: Transaction lifecycle.

If the transaction has already been paid in full, the Web Service returns a PSP_104 code.

If the transaction has already been cancelled, the Web Service returns a PSP_105 code.

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
Lev Bulgare (975) BGN 2
Brazilian real (986) BRL 2
Canadian dollar (124) CAD 2
Swiss franc (756) CHF 2
Chinese renminbi (156) CNY 1
Czech koruna (203) CZK 2
Danish crown (208) DKK 2
Euro (978) EUR 2
Pound Sterling (826) GBP 2
Hong Kong dollar (344) HKD 2
Kuna Croate (191) HRK 2
Hungarian forint (348) HUF 2
Indian rupee (356) INR 2
Indonesian rupiah (360) IDR 2
Japanese yen (392) JPY 0
Cambodian riel (116) KHR 0
South Korean won (410) KRW 0
Mexican peso (484) MXN 2
Malaysian ringgit (458) MYR 2
New Zealand dollar (554) NZD 2
Norwegian crown (578) NOK 2
Philippine peso (608) PHP 2
Polish zloty (985) PLN 2
Leu Roumain (946) RON 2
Russian ruble (643) RUB 2
Singapore dollar (702) SGD 2
Swedish krona (752) SEK 2
Thai baht (764) THB 2
Turkish lira (949) TRY 2
New Taiwan dollar (901) TWD 2
US dollar (840) USD 2
CFP Franc (953) XPF 0
South African rand (710) ZAR 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
AUTO Remboursement autorisé si le statut de la transaction le permet.
CANCELLATION_ONLY Effectue une annulation. Si la transaction est remisée, une erreur est retournée.
REFUND_ONLY Effectue un remboursement. Si la transaction n'est pas remisée, une erreur est retournée.

Format

To go further

For more information on the concept of capture, see the article Canceling/refunding a transaction.

mid

Merchant contract number. This field cannot be used and must be null.

comment

Public comment.

Format

Response reference

The web service returns the following object:

Response Context
Transaction Object containing transaction details.

See response reference for more information.