Charge Actions

Cancel Charge

This operation:

  1. Tries to cancel the clearing of the referenced charge. If this is not possible due to the clearing already being submitted, this endpoint will return an HTTP 409 error.
  2. If clearing has been cancelled, performs a reversal of the charge. This means that the authorization will be reversed.

This operation is only possible for charges with clearingMode set to auto.

Diners and ATM Charge support is <a class="experimental-tag-link" href="https://docs.silverflow.com/guides/api-lifecycle#tag/EXPERIMENTAL-Tag"><span class="tag experimental-tag">EXPERIMENTAL</span></a>.

Requires one of the following permissions:

  • charges:Cancel
  • charges:CancelOrRefund
post/charges/{chargeKey}/cancel

Request

Path parameters

chargeKeystring required

Uniquely identifies a charge.

Example:chg-1e1dAHhgstYTUhlphPzZ

Uniquely identifies a charge.

Headers

Idempotency-Keystring

This key is used to deduplicate requests that are retried. For more information see the section on Idempotency.

Example:28gKCluIEKp8jVboUyr2

Request body

referencestring

Action reference assigned by the agent. Must not start with "act-".

Example request

{
  "reference": "MyRef"
}

Response

The resulting reversal action.

type'reversal' required
keystring required

Uniquely identifies an action

chargeKeystring required

Uniquely identifies a charge.

referencestring

Action reference assigned by the agent. Must not start with "act-".

createdstring iso-8601-date-time required

The date and time this object was created

lastModifiedstring iso-8601-date-time

The date and time this object was last modified

versioninteger required

The version of this object

Example response

{
  "key": "act-1e1dA2fgs1YTUhlhyPOp",
  "chargeKey": "chg-1e1dAHhgstYTUhlphPzZ",
  "reference": "MyRef",
  "replacementAmount": {
    "value": 2599,
    "currency": "EUR"
  },
  "authorizationResponse": {
    "responseCode": "00",
    "responseCodeDescription": "Approved"
  },
  "version": 1
}

Changes

No recorded changes to this operation across all 1 revision of this API.