Get Started
Braintree Foreign Exchange as a Service (FXaaS) is available to eligible merchants in the UK and EU. To get started, contact your Braintree Account Manager, who will guide you through eligibility, contracting, and account setup. Once your account is activated and your FXaaS contract is signed, your Account Manager will provide the credentials and integration details needed to proceed.
To integrate BT FXaaS:
- Obtain an exchange rate quote
- Obtain an exchange rate quote
- Obtain an exchange rate quote
- Obtain an exchange rate quote
Prerequisite
- Ensure your FXaaS contract is signed and your merchant account is activated by your Braintree account Manager.
- Review your contract for key parameters: rate expiration interval, rate refresh time, FX fees, and other relevant terms.
Server-Side Implementation
Creating a transaction
When creating a transaction, pass the exchangeRateQuoteId from the PHP SDK.
The Exchange Rate Quote API is a GraphQL API, and the server-side implementation includes converting the below request passed to the API.
The client-side makes a request by passing the following variables:
- PHP
$variables = [
"quotes" => [
"baseCurrency" => "USD",
"quoteCurrency" => "EURC",
"baseAmount" => "12.19",
"markup" => "1.89",
],
];
$request = ExchangeRateQuoteRequest::factory($variables);and invoking the API:
- PHP
$response = $gateway->exchangeRateQuote()->generate($request);the response:
- PHP
$result = $gateway->transaction()->sale([
'amount' => '10.00',
'paymentMethodNonce' => $nonceFromTheClient,
'deviceData' => $deviceDataFromTheClient,
'exchangeRateQuoteId' => $exchangeRateQuoteIdFromTheClient,
'options' => ['submitForSettlement' => True]
]);