Create Exchange Order
Creates a foreign-exchange order from a valid quote and merchant-defined order number.
Endpoint
POST /remittance/exchange/create
Sandbox base URL: https://rem-api-sandbox.pagsmile.com
Content-Type: application/json; charset=UTF-8
The request uses the standard Remittance API request envelope. The fields below describe the decrypted biz_data object.
Request body
Decrypted biz_data fields
merchant_id
long
M
Pagsmile-assigned unique identifier of the merchant or institution whose account will be debited for the transaction.
order_no
string
M
Merchant-defined order number used to submit, query, and reconcile the foreign-exchange order.
Length: 16–36 characters.
account_no
string
M
Merchant account number used to settle the foreign-exchange order.
quote_id
string
M
Pagsmile-assigned unique identifier of the foreign-exchange quote.
sell_currency
string
M
Three-letter ISO 4217 code of the currency being sold.
buy_currency
string
M
Three-letter ISO 4217 code of the currency being purchased.
tx_amount
string
M
Amount used to calculate or execute the foreign-exchange transaction.
fixed_side
string
M
Specifies whether the sell amount or buy amount is fixed when calculating the quote.
See Fixed Side for supported values.
Default: SELL.
Plaintext biz_data example
{
"merchant_id": 100398,
"order_no": "ORDER_202607200001",
"account_no": "1234567890",
"quote_id": "100001",
"sell_currency": "USD",
"buy_currency": "USD",
"tx_amount": "100.00",
"fixed_side": "sell"
}Request example
Response
The data field in the response envelope is AES-encrypted. Decrypt random_key with your RSA private key, then use the resulting AES key to decrypt data. See Security for implementation details.
Encrypted response example
Decrypted data example
Response data fields
exchange_id
long
M
Pagsmile-assigned unique identifier of the exchange order.
merchant_id
long
M
Pagsmile-assigned unique identifier of the merchant associated with the returned record.
order_no
string
M
Merchant-defined order number used to submit, query, and reconcile the foreign-exchange order.
Length: 16–36 characters.
sell_currency
string
O
Three-letter ISO 4217 code of the currency being sold.
sell_amount
string
O
Amount of the sell currency in the foreign-exchange transaction.
buy_currency
string
O
Three-letter ISO 4217 code of the currency being purchased.
buy_amount
string
O
Amount of the buy currency in the foreign-exchange transaction.
fixed_side
string
O
Specifies whether the sell amount or buy amount is fixed when calculating the quote. See Fixed Side for supported values.
conversion_rate
string
O
Conversion rate applied between the sell and buy currencies.
transaction_out_id
long
O
Pagsmile-assigned unique identifier of the outgoing exchange transaction that debits the sell-currency account.
transaction_in_id
long
O
Pagsmile-assigned unique identifier of the incoming exchange transaction that credits the buy-currency account.
error_message
string
O
Human-readable explanation provided when processing fails.
Related APIs
Last updated