Skip to content

Create a void

Request

Cancels a payment authorisation before it is captured, releasing the amount held on the card. Works for single and frequent authorisations.

Required scope: void:create

Security
accountId and apiKey
Path
idstring, (uuid)required

The token of the operation to cancel — the single or frequent payment authorisation token.

Bodyapplication/jsonrequired

Void details

descriptivestring, <= 255 charactersrequired

Free-text reason for the void. Required, up to 255 characters. This will appear in the bank statement / MB WAY application.

Example:"Cancelling the duplicated authorisation"
transaction_keystring, <= 50 characters

Optional. Your own internal key identifying this void, up to 50 characters. Echoed back on the void details.

Example:"order-1982652-void"
curl -i -X POST \
  'https://api.test.easypay.pt/2.0/void/{id}' \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92' \
  -H 'Content-Type: application/json' \
  -d '{
    "descriptive": "Cancelling the duplicated authorisation",
    "transaction_key": "order-1982652-void"
  }'

Responses

Created

Bodyapplication/json
statusstring
Example:"ok"
messageArray of strings

An array of human-readable messages included in the response. These messages provide detailed information about the success of the operation or explain the reasons for any failure. This field is always present in the response to ensure clarity and transparency regarding the outcome of the API request.

Example:
[ "Your request was successfully created" ]
idstring

A unique identifier for the resource. While typically formatted as a UUID (Universally Unique Identifier), it can also be in other formats as defined by the user. This field ensures the resource can be distinctly recognized and referenced.

Example:"8010e7d5-9985-4ae3-b1bf-6b70019439c7"
Response
{ "status": "ok", "message": [ "Your request was successfully created" ], "id": "8010e7d5-9985-4ae3-b1bf-6b70019439c7" }