Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

User can cancel any existing transaction before being settled. It can only be performed on transactions, which have been authorised but not yet settled. Authenticate this request using HTTP Basic Auth by adding a bearer token to the header, e.g. Authentication: Bearer {{access_token}}. You can get the {{access_token}} from the create token request.

If the previous transaction is in Captured" state, then that transaction can be cancelled.


Anchor
cancel-transactions
cancel-transactions

Cancel Transactions

POST /pay/v1/transactions/{transaction_id}/cancels

Headers

Content-Typestring
Content type.

Authorizationstring
Access token generated from create token request.

Attributes

notereferencestring (optional)
Cancellation note (if any).

Request

Code Block
POST https://secure.blinkpayment.co.uk/api/pay/v1/transactions/BL-2349AGB/cancels HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...

{
    "notereference": "cancel note"
}

Response

Code Block
HTTP/1.1 200 OK
Content-Type: application/json

{
    "success": true,
    "message": "Cancelled successfully",
    "amount" : "1.01",
    "notereference": "cancel note",
    "transaction_id": "BL-2349AGB"
}