Transaction Cancellation

Overview

The Transaction Cancellation Module provides an avenue for customers to cancel standalone outgoing transfers from their Ibanera accounts (wallets) to external accounts (wallet).

Customers can obtain a real-time snapshot of whether or not a given transaction is eligible for cancellation, and submit requests for their transactions to be cancelled and subsequently refunded.

Due to the time-sensitive nature of pending transfers, it is possible that not all cancellation requests will succeed, in which case the transaction will proceed to completion.

Customers can only submit one cancellation request for any given transaction, and any additional requests to cancel that transaction will be ignored.

Here is an overview of the endpoints within this module:

  1. Get Transaction Cancellation Eligibility: Provides a real-time snapshot of whether or not the transaction can be cancelled through this module.

  2. Submit Transaction Cancellation Request: If successfully called, this endpoint enqueues a request to cancel a specific transaction. A successful response does not guarantee that the transaction will be cancelled, but rather that a request has been submitted.

Get Transaction Cancellation Eligibility

This endpoint will determine the current status of a transaction referenced by ID, and indicate to the caller whether or not the transaction may be cancelled, accurate at the time of calling.

The ID of the transaction is required. If the transaction belongs to a managed customer, then the caller may optionally provide the ID of the managed customer, but this is not required.

  • Endpoint: /api/v1/customer/transactions/cancel

  • Method: GET

  • Query Parameters:

    • transactionsId (Integer): The ID of the transaction (REQUIRED)

    • customersId (Integer): The ID of the managed customer (OPTIONAL)

Response Body Parameters and Types:

  • id (Integer): The ID of the transaction passed in the request, if successfully found. If the transaction is not found, this field will default to zero.

  • details (Object): Contains details about the transaction.

    • bCancellable (Boolean): Indicates whether or not the transaction may be cancelled

  • status (String): The status of the request. "1" indicates success, "0" indicates failure.

  • errors (Array): Any error messages, if present.

Successful Response Example

{
  "id": 84253,
  "details": {
    "bCancellable": true
  },
  "status": "1",
  "errors": []
}

Submit Transaction Cancellation Request

This endpoint will attempt to enqueue a cancellation request for a transaction, referenced by ID. Successfully submitted cancellation requests are processed asynchronously by our system. Note that a successful response means a request has been submitted, and is not a guarantee that the transaction has been cancelled.

The ID of the transaction must be provided. If the transaction belongs to a managed customer, then the caller may provide the ID of the managed customer, but this is not required.

This endpoint will return a HTTP 200 OK response in the event a cancellation request has successfully been submitted. If a transaction is deemed ineligible for cancellation, then the endpoint will return a HTTP 400 Bad Request error.

  • Endpoint: /api/v1/customer/transactions/cancel

  • Method: POST

Request Body Parameters

  • transactionsId (Integer): The ID of the transaction to cancel. (REQUIRED)

  • customersId (Integer): The ID of the managed customer to whom the transaction belongs. (OPTIONAL)

Request Example

{
  "transactionsId": 84253,
  "customersId": 14045
}

Response Body Parameters

  • id (Integer): The ID of the transaction cancellation request, if successfully generated. If no cancellation request was submitted, this field will default to zero.

  • details (Object): Contains details about the cancellation request.

    • transactionsId (Integer): The ID of the transaction to be cancelled.

    • cancellationRequestsCode (String): The reference code of the transaction cancellation request, if submitted.

  • status (String): The status of the request. "1" indicates success, "0" indicates failure.

  • errors (Array): Any error messages, if present.

Successful Response Example

{
  "id": 1015,
  "details": {
    "transactionsId": 84253,
    "cancellationRequestsCode": "CTXCRQ1015"
  },
  "status": "1",
  "errors": []
}

Last updated