Set Up Server-Side Payment Processing

A server-side payment processing integration requires a server-to-server integration between your Salesforce store and the payment provider. This implies using the payment component(s) shipped with your B2C or D2C Commerce app. In this model you either author, or obtain from the App Exchange, an Apex payment gateway adapter that handles the server-side payment transaction processing between the Salesforce platform and the payment gateway.

Create your store and configure checkout before you set up your payment system.

For exposure to security threats, implementing custom payment components with a server-side integration is not recommended.

The paved path for server-side integration in commerce checkout is a tokenization-to-authorization flow that currently supports only CardPaymentMethods and single use tokenization with no support for saved payment methods. From a checkout standpoint the PaymentRequestTypes to implement are Tokenize and Authorize. Of course you’ll need to implement the other request types to handle downstream operations in your order management system such as capture and referencedrefund. When integrating payments with a server to payment gateway server pattern, use our out-of-the-box payment components: Payment and Dual Payment (available in B2B stores only). Otherwise you are on an unpaved path.

The diagram illustrates a typical server-side integration. The Checkout UI component triggers the Commerce Checkout Payment APIs, which call the Commerce Payment Connect APIs. The Apex Payment Adapter posts request types to the gateway. Those request types are what you implement when you create the Apex Adapter

Diagram of Server-side payment flow.

To implement server-side payment processing, see Payment Gateway Adapters and then connect your payment gateway to your checkout using the integrated store service as described in Connect a Payment Gateway to Store Checkout.