---
schema_version: "1"
id: 2d8e25f389f25a8d0632d152022f7c1065d7d605415b36984f67438ce5eaedab
title: Commerce Payment Gateway Processing
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/salesforce-commerce/guides/d2c-commerce/b2b-b2c-comm-payment-gateway-processing.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-b2c-comm-payment-gateway-processing.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 06f38d64f99e60915f17c9ecffdba79f61340f7ec9daf1cfabb8532d3db3bda9
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
# Commerce Payment Gateway Processing

The Commerce Payment Gateway connects your store and third party payment providers. The gateway validates and processes payment API requests including tokenization, authorization, capture, refund, and other checkout API requests.

| Required Editions                                                       |
| ----------------------------------------------------------------------- |
| Available in: **Enterprise**, **Unlimited**, and **Developer** Editions |
| Available in: B2B Commerce and B2B2C Commerce                           |

The Commerce Payments Gateway uses the CommercePayments Apex namespace. For more information, see the [Apex Reference Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_namespace_commercepayments.htm).

The Commerce Payments Gateway parses key object fields passed by the UI Checkout components. These fields include data to tokenize and authorize the payment request. For example, the Payments Gateway requires a tokenize request to pass this information.

```
cardPaymentMethod: {
    cardHolderName: <string>,
    cardNumber: <string>,
    expiryMonth: <string>,
    expiryYear: <string>,
    cvv: <string>
}
address: {
    street: <string>,
    city: <string>,
    state: <string>,
    postalCode: <string>,
    country: <string>
}

```

Authorization, capture, refund, and other requests also pass these objects. Review the Stripe adapter samples in the [Payments Reference Package](https://github.com/forcedotcom/commerce-on-lightning/tree/main-2/examples/b2c/checkout/payment-gateway-integration) to see how objects for transmission to Stripe are handled.

Examples for the Salesforce Payment Adapter include:

- `tokenizeRequest → commercePayments.PaymentMethodTokenizationRequest`
- `authRequest → commercePayments.AuthorizationRequest`
- `captureRequest → commercePayments.CaptureRequest`
- `refundRequest → commercePayments.ReferencedRefundRequest`
