Foreign Exchange
API Information
| Title | Foreign Exchange |
|---|---|
|
Version |
v1 |
|
URL Sandbox |
https://sandbox.partner.api.bri.co.id/v1/valas/insert |
|
URL Production |
https://partner.api.bri.co.id/v1/valas |
Version Control
| Doc Version | API Version | Date | Link to document | Description |
|---|---|---|---|---|
|
v1 |
v1 |
1 February 2019 |
- |
Initial version |
Product Description
Foreign Exchange is needed for transactions in the global market and it has official rates recorded in the central bank. This API will help you to monitor real-time foreign exchange rates and can make forex transactions directly from your business dashboard.
Flow API

A. Currency Rate
Endpoint Description
This endpoint is used to get the telegraph transfer currency value at the time the endpoint is called.
General Information
| HTTP Method | GET |
|---|---|
| Path | /v1/valas/getrate/{{DEALT_CURRENCY}}/{{COUNTER_CURRENCY}} |
| Tipe Format | JSON |
| Authentication | OAuth 2.0 with Access Token |
Query Param Structure
Sample of HTTP request:
GET https://sandbox.partner.api.bri.co.id/v1/valas/getrate/{{DEALT_CURRENCY}}/{{COUNTER_CURRENCY}}
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
dealt_currency |
String |
Ya |
ISO 4217 currency code (eg. USD, EUR, GBP) |
|
counter_currency |
String |
Ya |
ISO 4217 currency code (IDR) |
Request & Response Payload Sample
Request :
curl --location --request GET 'https://sandbox.partner.api.bri.co.id/v1/valas/getrate/USD/IDR/' \
--header 'BRI-Timestamp: 2021-07-07T07:43:12.336Z' \
--header 'BRI-Signature: XKPARAVkxTh7FHOqqKv5mYLkhYz4HOCfu9OhtxjNvJo=' \
--header 'Authorization: Bearer lvshE1DDkROUvOorjjEntUE1XKQD'
Normal Response :
{
"status": true,
"responseDescription":"Success",
"responseCode":"001",
"data": {
"dealt_currency":"USD",
"counter_currency":"IDR",
"TT_buy":"14315.0000",
"TT_sell":"14465.0000",
"last_update":"5/16/2019 11:31:20 AM"
}
}
B. Forex Transaction
Endpoint Description
This endpoint is used for submitting forex transactions. This endpoint will reply with deal_number which needs to be taken to the BRI branch to make a transaction.
General Information
| HTTP Method | POST |
|---|---|
| Path | /v1/valas/insert |
| Tipe Format | JSON |
| Authentication | OAuth 2.0 with Access Token |
Header Structure
| Key
|
Value
|
Mandatory
|
Length
|
Description
|
Example
|
|---|---|---|---|---|---|
|
Authorization |
Bearer {token} |
M |
|
Access Token |
|
|
BRI-Timestamp |
|
M |
|
Timestamp in ISO8601 format |
|
|
BRI-Signature |
|
M |
64 |
Signature |
|
|
Content-Type |
application/json |
M |
|
|
|
Request Structure
|
Field |
Data Type |
Mandatory |
Description |
|---|---|---|---|
|
counter_currency |
string |
Yes |
- |
|
dealt_currency |
string |
Yes |
- |
|
dealt_amount |
string |
Yes |
- |
|
npwp |
string |
Yes |
- |
|
deal_type |
string |
Yes |
buy or sell |
Request :
curl --location --request POST 'https://sandbox.partner.api.bri.co.id/v1/valas/insert' \
--header 'Content-Type: application/json' \
--header 'BRI-Timestamp: 2021-07-07T07:43:12.336Z' \
--header 'BRI-Signature: XKPARAVkxTh7FHOqqKv5mYLkhYz4HOCfu9OhtxjNvJo=' \
--header 'Authorization: Bearer lvshE1DDkROUvOorjjEntUE1XKQD' \
--data-raw '{
"counter_currency":"IDR",
"dealt_currency":"USD",
"dealt_amount":"-10",
"npwp":"12344566",
"deal_type":"buy"
}'
Normal Response :
{
"status":true,
"responseCode": "001",
"responseDescription": "Transaction Successful",
"data": {
"deal_number": "A0908444",
"value_date": "9/20/2018",
"deal_date": "9/20/2018",
"rate": "13365.0000",
"dealt_amount": "4",
"dealt_currency": "USD",
"counter_amount": "53460.0000",
"expired_transaction": "2018-09-20T16:00:00"
}
}