Skip to content

Execute Transaction

Request URL

POST /transfer-to/bills/execute

Description

This endpoint finalizes and executes a previously initiated transaction for processing. The property "cFiTransactionId" is required for the request body and obtained through the previous endpoint, /transfer-to/bills/initiate.

Schema

Property table for transfer-to/bills/execute

Property Description Required Schema
cFiTransactionId The transaction ID in the connectFi system Yes {
  "type": "string",
  "pattern": "^[0-9a-zA-Z_]+$",
  "minLength": 1,
  "maxLength": 36,
  "description": "common-id"
}

Request Body

{
    "cFiTransactionId": "CLIENTID_3uyExblcBiwbG6yQYDkDtw"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "cFiTransactionId": "CLIENTID_3uyExblcBiwbG6yQYDkDtw"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/transfer-to/bills/execute',
  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/execute" --data "{\"cFiTransactionId\":\"CLIENTID_3uyExblcBiwbG6yQYDkDtw\"}" --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/EXECUTE 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_3uyExblcBiwbG6yQYDkDtw"
}

RESPONSE BODY

{
    "code": "0",
    "data": {
        "reference": "extTrnBill403",
        "cFiTransactionId": "CLIENTID_3uyExblcBiwbG6yQYDkDtw",
        "merchantId": "10000001",
        "cFiTraceNumber": "000000000006993",
        "status": "Processing",
        "amount": 1.01,
        "currency": "USD",
        "dtsCreated": "2023-11-02T11:46:23.865Z"
    },
    "requestId": "8c65a430797511eeb5658f28ab5fe311"
}