The Braintree Gateway API can be used two ways: either Server-to-Server or Transparent Redirect.
The Server-to-Server API is a usual web service API. For an example transaction workflow, your customer would submit his or her credit card data on your website to your server. You would then send it from your server to the gateway. Transmission from your server to the gateway is encrypted using SSL. It is important to note that the full credit card data is passing through your server in this scenario. We developed the Transparent Redirect API to eliminate this security risk for merchants.
Our Transparent Redirect API completely eliminates the handling and processing of credit card data from your environment. This greatly reduces the scope of PCI Compliance and increases your security. Using Transparent Redirect, you can maintain the same look and feel of a normal check out process and have complete control over the user experience. Transparent Redirect is not a hosted page solution; it's entirely transparent to the end user.
Step 1 Upon the customer's request to checkout, you display a form to your customer that collects the required payment information. When the customer submits the form, the data is posted directly to the Braintree Gateway over an SSL connection.
Step 2 The Braintree Gateway then stores the data and redirects the customer back to the your site. Because the Gateway redirects the customer back to your site without displaying any content the customer won't notice that he or she ever left your site.
Step 3 The customer's browser requests the redirected URL from the merchant's site. The query string for the request URL contains a token that identifies the data stored in Step 1.
Step 4 Using the client library, you make a server-to-server call to the Gateway to complete the processing of the request. This step ensures that if the customer doesn't complete the redirect back to your site, the Gateway will not run the transaction.
Step 5 After receiving the confirmation request, the Gateway will run the transaction and send the response back to your server.
Step 6 You can use the response from Step 5 to display relevant data to the customer, such as the status of the transaction.