Cancel payments Copy section link Copied!

Depending on the payment method used for a transaction, you can cancel a payment. If the payment can’t be cancelled, then you would want to refund it instead.

The ability to cancel a payment depends on:

  • The payment method used to process the initial payment
  • The operation status:
    • Registered: The operation is created


Please refer to each payment method section below to learn more about its specificities.

Please refer to the payment flow to understand when this operation is valid.

Cancel a payment Copy section link Copied!

From your server, make a /payin/cancel request:

Parameter Name
Required
Type
Description
orderId
check
string
Order id obtained when the payment was made and the order was created.
transactionId
string
Id of the payment transaction.
metaData
object
JSON data for the marketplace. This data is not used by payment systems.

Example Copy section link Copied!

JSON
Copy
Copied
{
"orderId": "432156",
"transactionId": "123456789"
}
Copy
Copied

Retrieving the result Copy section link Copied!

In response to your request, you will receive the transactionActionsResponse object, including the following:

Parameter Name
Type
Description
resultCode
string

resultCode of the processing

orderStatus
string
transactionList
array

List of transaction for the order

resultCodeMessage
string

Example Copy section link Copied!

Here is a JSON payload example of a /payin/cancel request:

JSON
Copy
Copied
{
"resultCode": "0",
"orderStatus": "complete",
"transactionList": [
{
"id": "123123123",
"status": "completed",
"amount": {
"value": "100",
"currency": "EUR"
},
"paymentMethodId": "002"
}
]
}
Copy
Copied

If your request encountered an error, you can use the following codes for troubleshooting. You can also check these additional resources:

Cancel by payment method Copy section link Copied!

As described in the process flow diagrams, the cancel operation can be done under certain conditions.

SCT Copy section link Copied!

The payment can only be cancelled if the operation status is registered and if the transaction status is completed.

SDD payments Copy section link Copied!

The payment can only be cancelled if the operation status is registered and if the transaction status is completed. Also, the cancellation date must be earlier than the payment date before 12pm.

Card payments Copy section link Copied!

In the case of a card payment, a card capture can be cancelled if it has been authorized and captured.

Also, the capture can be cancelled if:

  • The transaction status must be completed.
  • The cancellation date must be equal to the capture date.
  • The cancellation must be accepted.

The authorization itself can’t be cancelled, but an authorization doesn’t imply a payment.