E-Transfer Cancellation

PUT {{domain}}/api/v1/transactions/:id/cancel

Overview

This endpoint allows you to attempt to cancel an in progress e-transfer transaction. Note that the cancellation request will fail if the recipient has already deposited the funds, and successful cancellation using this endpoint will incur an Interac network cancellation fee.

Request & Response

Request Path Variable

PATH VARIABLETypeDescription
idstring, requiredTransaction id

Response

FieldTypeDescription
idalphanumericTransaction id
statusstringCurrent status of transaction
currencystringThe currency of the transaction amount
amountintegerThe amount of the transaction
networkstringName of the network used
typestringType of transaction
gateway_codesarrayCodes returned from the gateway. Each code is an object that includes a code and message field.
updated_atstringTime the transaction was updated

SAMPLE REQUEST & RESPONSE

Request

PUT {{domain}}/api/v1/transactions/6ecdfce3-ecac-4d96-8cc4-c921f88eddaf/cancel

Responses

Successful Cancellation

{
   "amount": 199,
   "currency": "CAD",
   "gateway_codes": [
       {
           "code": "action_code_not_found",
           "message": "No action code found"
       }
   ],
   "id": "6ecdfce3-ecac-4d96-8cc4-c921f88eddaf",
   "network": "etransfer",
   "status": "cancelled",
   "type": "push",
   "updated_at": "2022-08-16T08:40:24"
}

Failed Cancellation - Due to e-transfer was already successful

{
   "error": {
       "code": "completed_transaction",
       "message": "Transaction ID 6ecdfce3-ecac-4d96-8cc4-c921f88eddaf is completed and can no longer be cancelled."
   }
}

Non e-transfer cancellation

{
   "error": {
       "code": "not_implemented",
       "message": "Cancellation not available for network type"
   }
}