Update Fee Profile by Account Number
'UpdateFeeProfileByAccountNumber' API enables to update a fee profile for an account
Bank or financial institution can update fee profile of an account, if required. On providing respective account number for which the profile to be updated along with transaction type and fee details as request, the fee profile is updated with an ID.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Request Parameters
- cURL
- C#
- Go
- NodeJS
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"method":"FeeService.UpdateFeeProfileByAccountNumber","id":"1","params":{"api":{"signature":"{{signature}}","keyId":"{{ApplicationKeyId}}","credential":"{{Credential}}"},"payload":{"monthlyFee":15,"accountNumber":"200344329213521","_transactionFees":[{"transactionType":"CHEQUE_DEPOSIT","feeAmount":1,"isFixed":true,"tax":3},{"TransactionType":"MASSPAY","FeeAmount":2,"IsFixed":true,"Tax":1},{"TransactionType":"REMITTANCE","FeeAmount":2,"IsFixed":true,"Tax":1},{"TransactionType":"BILLPAY","FeeAmount":2,"IsFixed":true,"Tax":1}]}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""method"": ""FeeService.UpdateFeeProfileByAccountNumber"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""keyId"": ""{{ApplicationKeyId}}"",
" + "\n" +
@" ""credential"": ""{{Credential}}""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""monthlyFee"": 15,
" + "\n" +
@" ""accountNumber"": ""200344329213521"",
" + "\n" +
@" ""_transactionFees"": [
" + "\n" +
@" {
" + "\n" +
@" ""transactionType"": ""CHEQUE_DEPOSIT"",
" + "\n" +
@" ""feeAmount"": 1,
" + "\n" +
@" ""isFixed"": true,
" + "\n" +
@" ""tax"": 3
" + "\n" +
@" },
" + "\n" +
@" {
" + "\n" +
@" ""TransactionType"": ""MASSPAY"",
" + "\n" +
@" ""FeeAmount"": 2,
" + "\n" +
@" ""IsFixed"": true,
" + "\n" +
@" ""Tax"": 1
" + "\n" +
@" },
" + "\n" +
@" {
" + "\n" +
@" ""TransactionType"": ""REMITTANCE"",
" + "\n" +
@" ""FeeAmount"": 2,
" + "\n" +
@" ""IsFixed"": true,
" + "\n" +
@" ""Tax"": 1
" + "\n" +
@" },
" + "\n" +
@" {
" + "\n" +
@" ""TransactionType"": ""BILLPAY"",
" + "\n" +
@" ""FeeAmount"": 2,
" + "\n" +
@" ""IsFixed"": true,
" + "\n" +
@" ""Tax"": 1
" + "\n" +
@" }
" + "\n" +
@" ]
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"method": "FeeService.UpdateFeeProfileByAccountNumber",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"signature": "{{signature}}",`+"
"+`
"keyId": "{{ApplicationKeyId}}",`+"
"+`
"credential": "{{Credential}}"`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"monthlyFee": 15,`+"
"+`
"accountNumber": "200344329213521",`+"
"+`
"_transactionFees": [`+"
"+`
{`+"
"+`
"transactionType": "CHEQUE_DEPOSIT",`+"
"+`
"feeAmount": 1,`+"
"+`
"isFixed": true,`+"
"+`
"tax": 3`+"
"+`
},`+"
"+`
{`+"
"+`
"TransactionType": "MASSPAY",`+"
"+`
"FeeAmount": 2,`+"
"+`
"IsFixed": true,`+"
"+`
"Tax": 1`+"
"+`
},`+"
"+`
{`+"
"+`
"TransactionType": "REMITTANCE",`+"
"+`
"FeeAmount": 2,`+"
"+`
"IsFixed": true,`+"
"+`
"Tax": 1`+"
"+`
},`+"
"+`
{`+"
"+`
"TransactionType": "BILLPAY",`+"
"+`
"FeeAmount": 2,`+"
"+`
"IsFixed": true,`+"
"+`
"Tax": 1`+"
"+`
}`+"
"+`
]`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/jsonrpc',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"method": "FeeService.UpdateFeeProfileByAccountNumber",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"monthlyFee": 15,
"accountNumber": "200344329213521",
"_transactionFees": [
{
"transactionType": "CHEQUE_DEPOSIT",
"feeAmount": 1,
"isFixed": true,
"tax": 3
},
{
"TransactionType": "MASSPAY",
"FeeAmount": 2,
"IsFixed": true,
"Tax": 1
},
{
"TransactionType": "REMITTANCE",
"FeeAmount": 2,
"IsFixed": true,
"Tax": 1
},
{
"TransactionType": "BILLPAY",
"FeeAmount": 2,
"IsFixed": true,
"Tax": 1
}
]
}
}
});
req.write(postData);
req.end();
Body
{
"method": "FeeService.UpdateFeeProfileByAccountNumber",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"monthlyFee": 15,
"accountNumber": "200344329213521",
"_transactionFees": [
{
"transactionType": "CHEQUE_DEPOSIT",
"feeAmount": 1,
"isFixed": true,
"tax": 3
},
{
"TransactionType": "MASSPAY",
"FeeAmount": 2,
"IsFixed": true,
"Tax": 1
},
{
"TransactionType": "REMITTANCE",
"FeeAmount": 2,
"IsFixed": true,
"Tax": 1
},
{
"TransactionType": "BILLPAY",
"FeeAmount": 2,
"IsFixed": true,
"Tax": 1
}
]
}
}
}
Response: 200
Response Parameters
{
"id": "1",
"result": {
"ID": "3760"
}
}