Payment gateway records and store mapping
Key Takeaway
A store uses a payment gateway at checkout only after a StoreIntegratedService record maps the PaymentGateway Id to that store through the Integration field.
A payment gateway in B2B Commerce is a small chain of records that tells Salesforce how to reach an external payment processor. You build the chain first and then map it to a store, because a store can't use the gateway at checkout until that mapping exists.
The chain of records
The chain starts with an Apex adapter class, and each later record points to the one before it.
- The Apex adapter class talks to the external gateway.
PaymentGatewayProviderpoints to the adapter class throughApexAdapterId. As a setup entity,PaymentGatewayProviderdefines the connection to a payment gateway Apex adapter.PaymentGatewaypoints to thePaymentGatewayProviderthroughPaymentGatewayProviderId. ThePaymentGatewayrecord represents the connection to an external payment gateway and holds the connection details.