Valuta Asing

Informasi API

Title Valuta Asing

Version

v1.0

URL Sandbox

https://sandbox.partner.api.bri.co.id/v1/valas/insert

URL Production

https://partner.api.bri.co.id/v1/valas

Kendali Versi

Versi Dok Versi API Tanggal Tautan Dokumen Deskripsi

v1.0

v1.0

1 February 2019

-

Versi Awal

Deskripsi Produk

Valuta Asing diperlukan untuk transaksi di pasar global dan memiliki kurs resmi yang tercatat di bank sentral. API ini akan membantu Anda memantau nilai tukar mata uang asing secara real-time dan dapat melakukan transaksi valas langsung dari dashboard bisnis Anda.

Flow API

A. Info Kurs

Penjelasan Endpoint

Endpoint ini digunakan untuk mendapatkan nilai mata uang transfer telegraf pada saat terakhir di call.

Informasi Umum

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

Deskripsi

dealt_currency

String

Ya

ISO 4217 kode mata uang (eg. USD, EUR, GBP)

counter_currency

String

Ya

ISO 4217 kode mata uang (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. Transaksi Valas

Penjelasan Endpoint

Endpoint ini digunakan untuk pengajuan transaksi forex. Endpoint ini akan membalas dengan deal_number yang perlu dibawa ke cabang BRI untuk melakukan transaksi.

Informasi Umum

HTTP Method POST
Path /v1/valas/insert
Tipe Format JSON
Authentication OAuth 2.0 with Access Token

Header Structure

Key

 

Value

 

Mandatory

 

Length

 

Deskripsi

 

Contoh

 

Authorization

Bearer {token}

M

 

Access Token

 

BRI-Timestamp

 

M

 

Timestamp dengan format ISO8601

 

BRI-Signature

 

M

64

Signature

 

Content-Type

application/json

M

 

 

 

Request Structure

Field

Data Type

Mandatory

Deskripsi

counter_currency

string

Ya

-

dealt_currency

string

Ya

-

dealt_amount

string

Ya

-

npwp

string

Ya

-

deal_type

string

Ya

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"
	}
}