Bulk

Transaction of money of two different currencies between accounts of the same customer in the same country.

Exchange - Bulk

POST https://api.stage.localpayment.com/currency-exchange

Transaction of money of two different currencies between accounts of the same customer in the same country

Headers

NameTypeDescription

Atorization*

String

Mandatory. JWT token in format Bearer eyJ0... . For more information about authentication, please refer to Authentication

Request Body

NameTypeDescription

country*

String

Mandatory. Your from user's country (i.e. country in which the payment will be processed), in ISO format. Please refer to Country Codes for a full list of supported countries

externalId*

String

Mandatory. An ID that is meaningful to you and your system. Must be unique

exchangeRateToken*

String

Mandatory. Token provided by the Foreign Exchange service in order to use an upfront agreed exchange rate

account*

OBJECT

Mandatory. Information related to account numbers to transfer

debited*

OBJECT

Mandatory. Information related to debited account number

currency*

String

Mandatory. The currency in which the amount is expressed.

accountNumber*

String

Mandatory. Account number from

amount*

String

Mandatory. Amount to charge to your end user

credited*

OBJECT

Mandatory. Information related to credited account number

accountNumber*

String

Mandatory. Account number to.

{
    "transactionType": "CurrencyExchange",
    "externalId": "",
    "internalId": "X11111XX-11X1-111X-X11X-111111X1X1XX",
    "country": "ARG",
    "currency": "ARS",
    "exchangeRateToken": "",
    "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.111.11111111",
            "amount": 0.18
        },
        "appliedFx": 224.54
    }
}

Example: Without requesting a quote

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"
    }
  }
}'

Example: Including the token obtained in a previous quote

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"
    }
  }
}'

Last updated