Transaction of money of two different currencies between accounts of the same customer in the same country
Example: Without requesting a quote
Request Status Ok Bad request
Copy curl --location '{{api_environment_url}}/api/currency-exchange' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
"country": "ARG",
"currency": "EUR",
"externalId": "11112222",
"exchangeRateToken": "",
"account": {
"debited": {
"currency": "EUR",
"accountNumber": "111.1111.11111111",
"amount": 10
},
"credited": {
"currency": "USD",
"accountNumber": "000.000.00000000"
}
}
}'
Copy {
"transactionType": "CurrencyExchange",
"externalId": "11112222",
"internalId": "e60d4fee-d75f-4bbe-a3b3-06e07a975c3b",
"country": "ARG",
"currency": "EUR",
"exchangeRateToken": "",
"clientCode": "0001",
"creationDate": "2023-03-22T13:30:54.892+00:00",
"errors": [],
"status": {
"code": "200",
"description": "COMPLETED",
"detail": "CURRENCY EXCHANGE"
},
"account": {
"debited": {
"currency": "EUR",
"accountNumber": "111.1111.11111111",
"amount": 10
},
"credited": {
"currency": "USD",
"accountNumber": "000.000.00000000",
"amount": 8.62
},
"appliedFx": 0.86
}
}
Copy {
"externalId": "11112222",
"internalId": "6fc7e955-7704-4558-8a05-6f4a2c3d9b45",
"errors": [
{
"code": "705",
"detail": "Credited account currency not match"
}
],
"status": {
"code": "705",
"description": "REJECTED",
"detail": "Credited account currency not match"
}
}
Example: Including the token obtained in a previous quote
Request Status Ok Bad request
Copy curl --location '{{api_environment_url}}/api/currency-exchange' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
"country": "ARG",
"currency": "EUR",
"externalId": "11112222",
"exchangeRateToken": "af5606b0-1ce7-48f8-ad8a-734934c601ec",
"account": {
"debited": {
"currency": "EUR",
"accountNumber": "111.111.11111111",
"amount": 10
},
"credited": {
"currency": "USD",
"accountNumber": "000.000.00000000"
}
}
}'
Copy {
"transactionType": "CurrencyExchange",
"externalId": "111111",
"internalId": "12bb1070-dfec-45bf-89b1-c45fbfa3b141",
"country": "ARG",
"currency": "ARS",
"exchangeRateToken": "af5606b0-1ce7-48f8-ad8a-734934c601ec",
"clientCode": "0005",
"creationDate": "2023-03-21T21:25:14.533+00:00",
"errors": [],
"status": {
"code": "200",
"description": "COMPLETED",
"detail": "CURRENCY EXCHANGE"
},
"account": {
"debited": {
"currency": "ARS",
"accountNumber": "111.111.11111111",
"amount": 40
},
"credited": {
"currency": "EUR",
"accountNumber": "000.000.00000000",
"amount": 0.18
},
"appliedFx": 224.54
}
}
Copy {
"externalId": "111111",
"internalId": "12bb1070-dfec-45bf-89b1-c45fbfa3b141",
"errors": [
{
"code": "703",
"detail": "Accounts countries must be match"
}
],
"status": {
"code": "703",
"description": "REJECTED",
"detail": "Accounts countries must be match"
}
}