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
- Create a transaction using the quote, and submit it for settlement
- Handle market-moving events
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 ExchangeRateQuoteIdfrom from the .NET SDK.
When creating a transaction, pass the exchangeRateQuoteId obtained from the SDK's Exchange Rate Quote API. The Exchange Rate Quote API is a GraphQL API; the server-side implementation converts a client-passed request into the API call, retrieves the quote's id from the response, and passes that id into the transaction sale.
var quoteRequest = new ExchangeRateQuoteRequest();
quoteRequest.AddExchangeRateQuoteInput(new ExchangeRateQuoteInput("USD", "EUR", "12.19", "12.14"));
var response = gateway.ExchangeRateQuote.Generate(quoteRequest);
var quoteId = response.Quotes[0].Id;TransactionRequest request = new TransactionRequest {
Amount = 12.19M,
PaymentMethodNonce = nonceFromTheClient,
ExchangeRateQuoteId = quoteId,
DeviceData = deviceDataFromTheClient,
Options = new TransactionOptionsRequest {
SubmitForSettlement = true
}
};
Result<Transaction> result = gateway.Transaction.Sale(request);Handle market moving events
Exchange rates refresh daily. On occasion, significant movement in the FX market may cause a rate to be refreshed outside of the normal daily schedule. This is known as a market-moving event.
If a market-moving event occurs after you've obtained a quote but before your transaction settles, that transaction will be processed using the current market rate at settlement instead of your originally quoted rate. You'll be notified if any of your transactions are affected
To minimize your exposure to market-moving events, we recommend requesting a new exchange rate quote at least every 2 hours rather than relying on a single quote for its full validity window. This keeps the rate you're quoting to your buyers closer to the current market rate at all times.