Charge Fee
curl --request POST \
--url https://access.utgl.io/v1/fees/charge \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intent": "CARD_APPLICATION_FEE",
"amount": 10.5,
"currency": "HKD",
"xid": "1d931723-b386-4632-98aa-070c407ca3f0",
"xmetadata": "<unknown>"
}
'import requests
url = "https://access.utgl.io/v1/fees/charge"
payload = {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intent": "CARD_APPLICATION_FEE",
"amount": 10.5,
"currency": "HKD",
"xid": "1d931723-b386-4632-98aa-070c407ca3f0",
"xmetadata": "<unknown>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
intent: 'CARD_APPLICATION_FEE',
amount: 10.5,
currency: 'HKD',
xid: '1d931723-b386-4632-98aa-070c407ca3f0',
xmetadata: '<unknown>'
})
};
fetch('https://access.utgl.io/v1/fees/charge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://access.utgl.io/v1/fees/charge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'intent' => 'CARD_APPLICATION_FEE',
'amount' => 10.5,
'currency' => 'HKD',
'xid' => '1d931723-b386-4632-98aa-070c407ca3f0',
'xmetadata' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://access.utgl.io/v1/fees/charge"
payload := strings.NewReader("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"intent\": \"CARD_APPLICATION_FEE\",\n \"amount\": 10.5,\n \"currency\": \"HKD\",\n \"xid\": \"1d931723-b386-4632-98aa-070c407ca3f0\",\n \"xmetadata\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://access.utgl.io/v1/fees/charge")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"intent\": \"CARD_APPLICATION_FEE\",\n \"amount\": 10.5,\n \"currency\": \"HKD\",\n \"xid\": \"1d931723-b386-4632-98aa-070c407ca3f0\",\n \"xmetadata\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://access.utgl.io/v1/fees/charge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"intent\": \"CARD_APPLICATION_FEE\",\n \"amount\": 10.5,\n \"currency\": \"HKD\",\n \"xid\": \"1d931723-b386-4632-98aa-070c407ca3f0\",\n \"xmetadata\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"transaction": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xid": "<string>",
"xmetadata": "<unknown>",
"refId": "CT34567890",
"cardAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardLast4": "<string>",
"cardEmbossedName": "<string>",
"createdAt": "2022-11-10T07:47:09.415Z",
"postedAt": "2022-11-10T07:47:09.415Z",
"authorization": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency": "USD",
"amount": 128.29,
"createdAt": "2022-11-10T07:47:09.415Z",
"type": "Payment authorization type",
"responseCode": "<string>",
"responseMessage": "<string>",
"cardPresent": true
},
"merchant": {
"name": "UBER * PENDING Amsterdam NLD",
"mcc": "4121",
"category": "Taxicabs and limousines",
"country": "HK"
},
"currency": "HKD",
"amount": 1000,
"description": "UBER * PENDING Amsterdam NLD",
"disputeStatus": "pending",
"grossAmount": 1000
},
"amount": 123,
"currency": "<string>",
"intent": "<string>",
"intentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"code": "INSUFFICIENT_BALANCE",
"message": "The funding account has insufficient balance to complete the transfer. Create a Transfer to fund the source account."
}Fees
Charge Fee
Instantly charge a fee to an account or card account. Fees charged will be reflected in the account balance immediately.
POST
/
fees
/
charge
Charge Fee
curl --request POST \
--url https://access.utgl.io/v1/fees/charge \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intent": "CARD_APPLICATION_FEE",
"amount": 10.5,
"currency": "HKD",
"xid": "1d931723-b386-4632-98aa-070c407ca3f0",
"xmetadata": "<unknown>"
}
'import requests
url = "https://access.utgl.io/v1/fees/charge"
payload = {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intent": "CARD_APPLICATION_FEE",
"amount": 10.5,
"currency": "HKD",
"xid": "1d931723-b386-4632-98aa-070c407ca3f0",
"xmetadata": "<unknown>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
intent: 'CARD_APPLICATION_FEE',
amount: 10.5,
currency: 'HKD',
xid: '1d931723-b386-4632-98aa-070c407ca3f0',
xmetadata: '<unknown>'
})
};
fetch('https://access.utgl.io/v1/fees/charge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://access.utgl.io/v1/fees/charge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'intent' => 'CARD_APPLICATION_FEE',
'amount' => 10.5,
'currency' => 'HKD',
'xid' => '1d931723-b386-4632-98aa-070c407ca3f0',
'xmetadata' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://access.utgl.io/v1/fees/charge"
payload := strings.NewReader("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"intent\": \"CARD_APPLICATION_FEE\",\n \"amount\": 10.5,\n \"currency\": \"HKD\",\n \"xid\": \"1d931723-b386-4632-98aa-070c407ca3f0\",\n \"xmetadata\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://access.utgl.io/v1/fees/charge")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"intent\": \"CARD_APPLICATION_FEE\",\n \"amount\": 10.5,\n \"currency\": \"HKD\",\n \"xid\": \"1d931723-b386-4632-98aa-070c407ca3f0\",\n \"xmetadata\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://access.utgl.io/v1/fees/charge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"intent\": \"CARD_APPLICATION_FEE\",\n \"amount\": 10.5,\n \"currency\": \"HKD\",\n \"xid\": \"1d931723-b386-4632-98aa-070c407ca3f0\",\n \"xmetadata\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"transaction": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"xid": "<string>",
"xmetadata": "<unknown>",
"refId": "CT34567890",
"cardAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardLast4": "<string>",
"cardEmbossedName": "<string>",
"createdAt": "2022-11-10T07:47:09.415Z",
"postedAt": "2022-11-10T07:47:09.415Z",
"authorization": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency": "USD",
"amount": 128.29,
"createdAt": "2022-11-10T07:47:09.415Z",
"type": "Payment authorization type",
"responseCode": "<string>",
"responseMessage": "<string>",
"cardPresent": true
},
"merchant": {
"name": "UBER * PENDING Amsterdam NLD",
"mcc": "4121",
"category": "Taxicabs and limousines",
"country": "HK"
},
"currency": "HKD",
"amount": 1000,
"description": "UBER * PENDING Amsterdam NLD",
"disputeStatus": "pending",
"grossAmount": 1000
},
"amount": 123,
"currency": "<string>",
"intent": "<string>",
"intentId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"code": "INSUFFICIENT_BALANCE",
"message": "The funding account has insufficient balance to complete the transfer. Create a Transfer to fund the source account."
}Authorizations
BasicBearer
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
account ID or card account ID
supported fee intents
Example:
"CARD_APPLICATION_FEE"
amount overrides the existing fee schedule
Required range:
x >= 0Example:
10.5
current overrides the existing fee schedule
Example:
"HKD"
UUID
Example:
"1d931723-b386-4632-98aa-070c407ca3f0"
Response
Charge fee successful
Charged fee entry for account or card account
Card account transaction
- Card Account Transaction
- Account Transaction
Show child attributes
Show child attributes
Status of the fee
Available options:
pending, posted, void Fee intent of the fee entry.
id of the instruction that caused the fee charge.
Was this page helpful?
⌘I

