Set Up Custom B2B Checkout Integrations
After you create your Apex classes, set up your checkout integrations.
Insert your Apex class into RegisteredExternalService. Use the ApexClassId as ExternalServiceProviderId, and use the ExternalServiceProviderType included in the code sample.
Configure a provider for each type, and include these entries.
| Id | ExternalServiceProviderId | ExternalServiceProviderType | DeveloperName | 
|---|---|---|---|
| 1uuxx00000001s9AAA | 01pxx0000004cGRAAY | Inventory | CHECK_INVENTORY | 
| 1uuxx00000001sAAAQ | 01pxx0000004cGQAAY | Shipment | COMPUTE_SHIPPING | 
| 1uuxx00000001sBAAQ | 01pxx0000004cGPAAY | Tax | COMPUTE_TAXES | 
| 1uuxx00000001sCAAQ | 01pxx0000004cGOAAY | Price | COMPUTE_PRICE | 
Insert the DeveloperName into StoreIntegratedService.
Use the ID from RegisteredExternalService for the Integration field and the ServiceProviderType matching the ExternalServiceProviderType from RegisteredExternalService.
| Id | Integration | ServiceProviderType | StoreId | 
|---|---|---|---|
| 1ffxx000000021pAAA | 1uuxx00000001s9AAA | Inventory | 0ZExx00000002rRGAQ | 
| 1ffxx000000021qAAA | 1uuxx00000001sAAAQ | Shipment | 0ZExx00000002rRGAQ | 
| 1ffxx000000021rAAA | 1uuxx00000001sBAAQ | Tax | 0ZExx00000002rRGAQ | 
| 1ffxx000000021sAAA | 1uuxx00000001sCAAQ | Price | 0ZExx00000002rRGAQ | 
| 1ffxx000000021tAAA | 2abxx00000001sDAAQ | Payment | 0ZExx00000002rRGAQ | 
Create a payment gateway, and locate the PaymentGatewayId.
A custom Apex call that makes outbound HTTP connections must reference a named credential to avoid creating hard-coded credentials within the code. Configure corresponding named credentials, referenced by the Apex class, after you finish your integration installation.