If your server requires HTTP requests to be made through a proxy, you can follow these steps to set up proxies for the server-side SDK.


To configure a proxy, first initialize your Braintree gateway with your API credentials:

var gateway = new BraintreeGateway
                  Environment = Braintree.Environment.PRODUCTION,
                  MerchantId = "braintree_merchant_id",
                  PublicKey = "braintree_public_key",
                  PrivateKey = "braintree_private_key"

You can then set a proxy URL and port for your gateway configuration:

gateway.Configuration.WebProxy = new WebProxy("http://your-proxy-domain.com:8080");

To use an authenticated proxy, you can also pass in a custom proxy object with credentials:

var proxy = new WebProxy("http://your-proxy-domain.com:8080");
proxy.Credentials = new NetworkCredential("username", "password");
gateway.Configuration.WebProxy = proxy;