---
schema_version: "1"
id: 2fc982d6eeaea76d08980ba9c45c2e1286f9ad22507e7d81cb49f4b1471b2918
title: Payment APIs
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-flow-apis.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-b2c-comm-payment-flow-apis.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 58f8f6a65dde83b2479f9aac9fd68e7f02b551e38e387bcafbdd5d8d1cce64fa
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
# Payment APIs

B2B Commerce implements a group of payment APIs to support tokenizing shopper credit cards without storing that information natively.

| Required Editions                                                       |
| ----------------------------------------------------------------------- |
| Available in: **Enterprise**, **Unlimited**, and **Developer** Editions |
| Available in: B2B Commerce                                              |

Shopper actions trigger payment API calls to a third-party service provider via the Payment Adapter framework. The APIs support tokenizing shopper credit cards so that no personal information is stored natively. Together with the licensed Salesforce Order Management (SOM) or 1C OM, the Payment Adapter framework exposes additional APIs. SOM manages the capture and refund flows and provides an integrated customer order lifecycle, including fulfillment and service.

These APIs initiate payments processing.

- **SetPaymentMethod** tokenizes the shopper’s credit card and returns a token.
- **PlaceOrder** (returns Auth Code) validates the cart, reserves inventory, converts cart to order, authorizes payment, and activates the order in SOM. The payment authorization reserves funds from the available credit of the credit card, but it’s not a payment. To the shopper, it can display as pending.

After the transaction is tokenized and the order placed, any of these APIs and corresponding transactions can occur.

![Diagram summarizing API calls](https://developer.salesforce.com/media/d2c-commerce/payment_som_apis.png)

- Authorization reversals release the funds reserved by the payment authorization, removing them from pending transactions.
- Capture consumes the funds reserved by the payment authorization.
- Sale is a transaction type where Authorization and Capture are executed as part of a single request. If successful, the order is fulfilled immediately.
- Void cancels the transfer of funds to the merchant account before settlement. When a payment is processed, funds are held. The balance is deducted from the customer’s credit limit, but not yet transferred to the merchant account. At a later point, all transactions are batched for settlement, and the funds are transferred to the merchant’s account. A transaction can be voided after purchase but before settlement.
- Refund is a transaction request that transfers the amount from the merchant’s account to the customer’s account.

**note:** In addition, A PostAuth API is required for client-side payment component implementations. The gateway adapter reads fields from the PostAuth Request class to validate the client-side transaction with the payment gateway. For more on the PostAuth objects, see [PostAuthorizationRequest Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_PostAuthorizationRequest.htm)

For more information on the other payment APIs, see [Commerce Connect REST Payment APIs](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_payments.htm).
