Currency conversion API
Last updated
Last updated
This is the API to convert a currency to VND.
Sequence Diagram
Step 1: Merchant calls GetExchangeRate API to get list of exchange rates.
Step 2: Merchant call Exchange API. If returned status is PASSED, NeoX will process
the request and notify the result via webhook.
Path: /v2/dib/exchange/{srcCurrency}-(dstCurrency}
Method: POST
Request: Content-Type: application/json
Url Params:
srcCurrency: Currency code supported by NeoX.
dstCurrency: Only support VND in this version.
Ex: /v2/dib/exchange/USD-VND
Parameter | Data Type | Require | Description |
---|---|---|---|
requestId | String | UUID is generated by merchant. (Unique) Exp:“90e7340b-5cbe-4ce7-886f-55181040af4f” | |
amount | Number | The amount | |
currency | String | The currency of the amount (srcCurrency or dstCurrency) is used for calculating the origin amount and target amount | |
description | String (256) | Description |
Field name | Data Type | Description |
---|---|---|
code | Number | System’s error code |
message | String | Error description |
data | Object | Exchange response data below. |
Exchange response data:
Field name | Data Type | Description |
---|---|---|
requestId | String | requestId in the exchange request. |
status | String | PASSED: Request successfully. Wait for result notification through webhook. FAILED: Submit request failed. |
code | Number | Logic's error code |