Skip to content

Voids

A void cancels a payment authorisation before it is captured. The acquirer releases the amount that was held on the customer's card, so no money ever moves — as if the transaction had never happened.

Use a void to undo an authorisation that has not yet been captured. To return money that has already been captured, use a Refund instead.

Voids are supported for single and frequent payment authorisations.

Get a void

Request

Returns the details and current status of a void, including the authorisation it cancelled. Use this to track a void's outcome after creation, since processing is asynchronous.

Required scope: void:read

Security
accountId and apiKey
Path
idstring, (uuid)required

The void's unique identifier (the id returned when the void was created).

curl -i -X GET \
  'https://api.test.easypay.pt/2.0/void/{id}' \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92'

Responses

OK

Bodyapplication/json
statusany

Indicates the current status of the void:

  • pending: Initial state — the void has been created and queued.
  • processing: The void is being processed by the acquirer.
  • success: The void completed successfully (the authorisation was released).
  • failed: The void could not be completed due to an error or issue.
Enum:"pending""processing""success""failed"
idstring, (uuid)

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.

transaction_keystring

A customizable text field for users to input their own identifier for the resource. This can be any string that helps the user uniquely identify or reference the resource in their own system.

descriptivestring

A text field that describes the transaction as it will appear on the end user's account statement. This is typically used to provide clear, recognizable information about the payment, such as "Payment of Invoice Nº 1982652" or "Ticket for Queen".

authorisationobject
Response
{ "status": "pending", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "transaction_key": "string", "descriptive": "string", "authorisation": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "waiting", "key": "string", "customer": {}, "method": {}, "currency": "EUR", "value": 15.78 } }