Cancel Transaction
Request URL
POST /transfer-to/bills/cancel
Description
This endpoint will allow the user to cancel a transaction, if the transaction is currently in a "Processing" or "Initiated" status and has not yet been packaged for sending. If successful, the transaction will move into a "Cancelled" status.
Schema
Property table for transfer-to/bills/cancel
Property | Description | Required | Schema |
---|---|---|---|
cFiTransactionId | The transaction ID in the connectFi system | Yes | { "type": "string", "pattern": "^[0-9a-zA-Z_]+$", "minLength": 1, "maxLength": 36, "$id": "common-id" } |
description | Description | No | { "type": "string", "pattern": "^((?![<>]).)*$", "minLength": 1, "maxLength": 100, "isNotOnlyWhitespace": true, "$id": "common-commonStr100Req" } |
Request Body
Snippet Examples
javascript
const axios = require('axios');
const data = {
"cFiTransactionId": "CLIENTID_TbF8Zve81HWYfmmlT3ASR",
"description": "Cancelling a transaction"
};
const config = {
method: 'POST',
url: '${CONNECTFI_BASE_URL}/transfer-to/bills/cancel',
headers: {
'Content-Type': "application/json",
'x-connectfi-token': "A long random string token received from /auth/get-token request"
},
data
};
let result;
try {
result = await axios.request(config);
if (result.status === 200) {
console.log(JSON.stringify(result.data));
}
} catch (err) {
console.log({
errCode: err.code,
responseStatus: err.response && err.response.status,
data: err.response && JSON.stringify(err.response.data)
});
}
cURL
curl --location "CONNECTFI_BASE_URL/transfer-to/bills/cancel" --data "{\"cFiTransactionId\":\"CLIENTID_TbF8Zve81HWYfmmlT3ASR\", \"description\":\"Cancelling a transaction\"}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request"
Successful Response Examples
200 TRANSFER-TO/BILLS/CANCEL SUCCESSFUL RESPONSE
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
x-connectfi-token | A long random string token received from /auth/get-token request |
REQUEST BODY
{
"cFiTransactionId": "CLIENTID_3ZIehCDOwgIAr2UiWWzbcw",
"description": "Cancelling a transaction"
}
RESPONSE BODY