CalculateAmount
Parameter description
Request
| name | type | required | desc | example value |
|---|---|---|---|---|
| param | JSONObject | YES | ||
| ─epayAccount | string | YES | Merchant Epay Account | test2020@epay.com |
| ─version | string | YES | Version Number | V2.0.0 |
| ─category | string | YES | BANK or CASH | BANK |
| ─paymentAmount | string | NO | Payment Amount | 4000.00 |
| ─receiveAmount | string | NO | Receive Amount | 4000.00 |
| ─paymentCurrency | string | YES | Payment Currency,Refer to currencyType | BRL |
| ─receiveCurrency | string | YES | ReceiveCurrency,Refer tocurrencyType | USD |
| ─countryCode | string | YES | country code:ISO 2 bits | BR |
| sign | string | YES | Signature,>= 64-bit string length | xxxxxxxxxsignxxxxx |
Response
| name | type | required | desc | example value |
|---|---|---|---|---|
| sign | string | YES | Signature | xxxxxxxxxsignxxxxx |
| epayAccount | string | YES | Merchant Epay Account | test2020@epay.com |
| version | string | YES | Version Number | V2.0.0 |
| code | integer | YES | response code 1:Success | 1 |
| message | string | YES | message info | success |
| data | JSONObject | YES | ||
| ─category | string | YES | BANK or CASH | BANK |
| ─countryCode | string | YES | Country code: ISO 2 bits | BR |
| ─paymentAmount | string | YES | Payment Amount | 4000.00 |
| ─paymentCurrency | string | YES | Payment Currency | BRL |
| ─receiveAmount | string | YES | Receive Amount | 4000.00 |
| ─receiveCurrency | string | YES | Receive Currency | USD |
| ─rate | string | YES | Rate | 0.184833 |
| ─fee | string | YES | Fee | 5.17 |
| ─rateMode | string | YES | Exchange rate model 0: USD to target currency, 1: target currency to USD | 1 |
Parameter example
curl --location --request POST 'http://29597375fx.epaydev.xyz/capi/openapi/payinApi/calculateAmount' \
--header 'Content-Type: application/json' \
--data-raw '{
"param": {
"epayAccount": "test2020@epay.com",
"category": "BANK",
"paymentAmount": "4000",
"receiveAmount": "",
"receiveCurrency": "USD",
"paymentCurrency": "BRL",
"countryCode": "BR",
"version": "V2.0.0"
},
"sign": "{{sign}}"
}'
requestExample
curl --location --request POST 'http://29597375fx.epaydev.xyz/capi/openapi/payinApi/calculateAmount' \
--header 'Content-Type: application/json' \
--data-raw '{
"param": {
"epayAccount": "test2020@epay.com",
"category": "BANK",
"paymentAmount": "4000",
"receiveAmount": "",
"receiveCurrency": "USD",
"paymentCurrency": "BRL",
"countryCode": "BR",
"version": "V2.0.0"
},
"sign": "{{sign}}"
}'
responseExample
{
"epayAccount": "test2020@epay.com",
"version": "V2.0.0",
"code": 1,
"message": "success",
"data": {
"category": "BANK",
"countryCode": "AU",
"locationId": "10090054",
"paymentAmount": "111.11",
"paymentCurrency": "USD",
"receiveAmount": "100.00",
"receiveCurrency": "AUD",
"rate": "1.111111",
"fee": "72.00",
"rateMode": "0"
}
"sign": "{{sign}}"
}