Request for currency exchange rate
This section provides the instructions on how to build the request for currency exchange rate.
| HTTP request method | POST |
| Request body format | JSON |
| API endpoint | /v2/customer/validate |
|
|||
|---|---|---|---|
| Object | Parameter | Description | |
|
general |
project_id |
Project ID you obtained from Flashpay when integrating. Example: |
|
|
payment_id |
Payment ID unique within your project. Example: |
||
|
signature |
Signature created after you've specified all the request parameters. For more information about signature generation, see Signature generation and verification. | ||
|
customer |
id |
Unique ID of the customer within your project. Example: |
|
|
account |
number |
Customer account number. Example: |
|
|
payment |
amount |
Payment amount in minor currency units without any decimal point or comma except for the cases when the currency doesn't have any minor currency units. If the currency doesn't have any minor units (i.e. the number of digits for minor currency units is zero), set this parameter to the amount in the major currency units. To check whether the currency has any minor units, see Currency units and Currency codes. Example: 100.00 RUB must be sent as |
|
|
currency |
Code of the payment currency in the ISO-4217 alpha-3 format. Example: |
||
|
by_method |
ID of the payment method. Set this parameter to bank-transfer/turkey. Example: |
||
Here is an example of the data from a request for currency exchange rate:
{
"general": {
"project_id": 1234,
"payment_id": "payment_47",
"signature": "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO/RLUkDJrOcZzUCwX6R/ekpZhkIQg=="
},
"customer": {
"id": "customer_123"
},
"account": {
"number": "TR24...388"
}
"payment": {
"amount": 10000,
"currency": "RUB",
"by_method": "bank-transfer/turkey"
}
}
Response with currency exchange rate
After receiving and processing your payout request, the payment platform sends you a synchronous response with information about the currency exchange rate.
{
"project_id": 1234,
"status": "success",
"request_id": "e0d123123ab4678ec2e"
"payment_id": "payment_47",
"code": "1",
"operation": {
"sum_initial": {
"amount": 10000,
"currency": "RUB"
},
"sum_converted": {
"amount": 5900,
"currency": "TRY"
},
"exchange_rate": 0.59,
"exchange_rate_description": "Exchange rate RUB/TRY 0.59"
}
}