POS Charge Actions

Cancel Charge [EXPERIMENTAL]

Notice: This endpoint has different server URLs and authorization method than the rest of the API. Cancel a previously created POS charge by reversing its authorization.

The cancel operation:

  1. Attempts to cancel the clearing of the referenced charge
  2. If clearing cannot be canceled (already submitted), returns HTTP 409
  3. If clearing is canceled successfully, performs a reversal of the authorization

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

post/pos/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-". This allows merchants to track actions with their own reference system.

Example request

{
  "reference": "cancel-001"
}

Response

The reversal action representing the cancellation

keystring required

Uniquely identifies an action

chargeKeystring required

Uniquely identifies a charge.

type'reversal' required

The type of action (always "reversal" for cancel operations)

referencestring

Action reference assigned by the agent. Must not start with "act-". This allows merchants to track actions with their own reference system.

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": "rvsl-5BH5chO93SXky5gw",
  "chargeKey": "chg-1e1dAHhgstYTUhlphPzZ",
  "reference": "cancel-001",
  "replacementAmount": {
    "value": 2599,
    "currency": "EUR",
    "breakdown": {
      "baseAmount": 2599,
      "cashback": 2599,
      "gratuity": 2599
    }
  },
  "authorizationResponse": {
    "responseCode": "00",
    "responseCodeDescription": "Approved"
  },
  "version": 1
}

Changes

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