• Register

Balance Conversion

This service is used for submitting request to refinance the specified amount based on provided booking parameters.

Code example

Click on the buttons to view code snippet:

curl -X 'POST' \
  'https://apitest.network.ae/cards/99985100160637589560/balances/convert' \
  -H 'accept: application/json' \
  -H 'Unique-Reference-Code: 130620221747' \
  -H 'Financial-Id: NIC' \
  -H 'Channel-Id: IVR' \
  -H 'Content-Type: application/json' \
  -d '{
  "currency": "AED",
  "amount": "5950.00",
  "plan_number": "42103",
  "instalment_description": "Balance Conversion",
  "transaction_ref_number": "9874123",
  "override_options": {
    "number_of_portions": "",
    "interest_rate": "10",
    "fee_waive": "N",
    "ad-hoc_fee_type": "F",
    "ad-hoc_fee": "20",
    "grace_period": "1",
    "free_period_number": "1",
    "portion_amount": "40000",
    "deduct_locked_trans": "N",
    "mark_converted_trans": "Y",
    "allocated_interest_amount": ""
  }
}'

import requests
import json

url = "https://apitest.network.ae/cards/99985100160637589560/balances/convert"

payload = json.dumps({
  "currency": "AED",
  "amount": "5950.00",
  "plan_number": "42103",
  "instalment_description": "Balance Conversion",
  "transaction_ref_number": "9874123",
  "override_options": {
    "number_of_portions": "",
    "interest_rate": "10",
    "fee_waive": "N",
    "ad-hoc_fee_type": "F",
    "ad-hoc_fee": "20",
    "grace_period": "1",
    "free_period_number": "1",
    "portion_amount": "40000",
    "deduct_locked_trans": "N",
    "mark_converted_trans": "Y",
    "allocated_interest_amount": ""
  }
})
headers = {
  'accept': 'application/json',
  'Unique-Reference-Code': '130620221747',
  'Financial-Id': 'NIC',
  'Channel-Id': 'IVR',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

setUrl('https://apitest.network.ae/cards/99985100160637589560/balances/convert');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'accept' => 'application/json',
  'Unique-Reference-Code' => '130620221747',
  'Financial-Id' => 'NIC',
  'Channel-Id' => 'IVR',
  'Content-Type' => 'application/json'
));
$request->setBody('{\n  "currency": "AED",\n  "amount": "5950.00",\n  "plan_number": "42103",\n  "instalment_description": "Balance Conversion",\n  "transaction_ref_number": "9874123",\n  "override_options": {\n    "number_of_portions": "",\n    "interest_rate": "10",\n    "fee_waive": "N",\n    "ad-hoc_fee_type": "F",\n    "ad-hoc_fee": "20",\n    "grace_period": "1",\n    "free_period_number": "1",\n    "portion_amount": "40000",\n    "deduct_locked_trans": "N",\n    "mark_converted_trans": "Y",\n    "allocated_interest_amount": ""\n  }\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"currency\": \"AED\",\n  \"amount\": \"5950.00\",\n  \"plan_number\": \"42103\",\n  \"instalment_description\": \"Balance Conversion\",\n  \"transaction_ref_number\": \"9874123\",\n  \"override_options\": {\n    \"number_of_portions\": \"\",\n    \"interest_rate\": \"10\",\n    \"fee_waive\": \"N\",\n    \"ad-hoc_fee_type\": \"F\",\n    \"ad-hoc_fee\": \"20\",\n    \"grace_period\": \"1\",\n    \"free_period_number\": \"1\",\n    \"portion_amount\": \"40000\",\n    \"deduct_locked_trans\": \"N\",\n    \"mark_converted_trans\": \"Y\",\n    \"allocated_interest_amount\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("https://apitest.network.ae/cards/99985100160637589560/balances/convert")
  .method("POST", body)
  .addHeader("accept", "application/json")
  .addHeader("Unique-Reference-Code", "130620221747")
  .addHeader("Financial-Id", "NIC")
  .addHeader("Channel-Id", "IVR")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();

Request Parameters:

HTTP Key Type   Max Description Remarks
header Unique-Reference-Code A/N 12 Unique Reference Code for identification of each request sent to API Mandatory
Channel-Id String 10 Requesting channel e.g. “IB” or "IVR" etc. Might change. Mandatory
Financial-Id  String 4 Source Bank Id e.g. “NIC” Mandatory
path card_identifier_id String Min – 16       Max - 19 Unique Identifier for Card Mandatory
trans_id String 18 Transaction ID Optional
query card_identify_type String 15 Identifier Type for Card (default EXID) Optional
body currency String 3 Currency Optional
amount String 28 Amount Optional
plan_number String 32 Plan number for conversion configured by the bank. Mandatory
instalment_description String 255 IPP Plan Description Optional
transaction_ref_number String 12 Transaction Reference Number Optional
override_options String 4 Number of portions Optional
String 3 Instalment fee rate Optional
String 1 Processing Fee Waiver Optional
String 1 Ad-hoc Fee type: P - percentage, F - fixed Optional
String 10 Ad-hoc Fee value: the number will be treated as percentage or amount, depending on the AH_FEE_TYPE Optional
String 3 Number of cycles to shift before billing the first portion. Optional
String 3 Number of portions to apply zero fee rate to. The period starts with the first portion. Optional
String 10 Desired maximum amount on the portion Optional
String 1 "Y" means deduct the transactions locked in the progress of transaction conversion from the available balance CONV_BAL_TYPE, when it's checked. Optional
String 1 Mark transactions as converted, for the amount of balance conversion. Optional
String 10 Total interest amount to be allocated to the portions. Optional


Request Json
{
  "currency": "AED",
  "amount": "5950.00",
  "plan_number": "42103",
  "instalment_description": "Balance Conversion",
  "transaction_ref_number": "9874123",
  "override_options": {
    "number_of_portions": "",
    "interest_rate": "10",
    "fee_waive": "N",
    "ad-hoc_fee_type": "F",
    "ad-hoc_fee": "20",
    "grace_period": "1",
    "free_period_number": "1",
    "portion_amount": "40000",
    "deduct_locked_trans": "N",
    "mark_converted_trans": "Y",
    "allocated_interest_amount": ""
  }

Response Parameters:

HTTP Response Code Description
200 Ok
400 Incorrect transaction currency
403 Incorrect override input
403 Booking amount exceeds the current value of the balance


Docs Navigation