---
schema_version: "1"
id: cd3a6362e244ec1cea0105cd88b6e337af603f598323605946fa84d832e00609
title: B2BCheckoutController Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_sfdc_checkout_B2BCheckoutController.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_checkout_B2BCheckoutController.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d89029d0ee0909b21f9b0500c0dd1188921781c2ab987e8266c236f9baa399ca
description: Communicate with simple checkout Apex methods to work with data related to B2B Commerce checkout. If you implement your own cart-to-order process without invoking the Cart to Order flow core action, you must invoke this method to correctly track your orders for GMV (Gross Merchandise Value) recognition.
---
# B2BCheckoutController Class

Communicate with simple checkout Apex methods to work with data related to B2B Commerce checkout.

## Namespace

[sfdc\_checkout](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_sfdc_checkout.htm "The Sfdc_Checkout namespace provides an interface and classes for B2B Commerce apps in Salesforce.")

## Usage

You must specify the sfdc\_checkout namespace when creating an instance of this class.

- **[B2BCheckoutController Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_checkout_B2BCheckoutController.htm#apex_sfdc_checkout_B2BCheckoutController_methods)**

## B2BCheckoutController Methods

The following are methods for B2BCheckoutController.

- **[licenseCompliance(cartId, orderId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_checkout_B2BCheckoutController.htm#apex_sfdc_checkout_B2BCheckoutController_licenseCompliance)**  
    If you implement your own cart-to-order process without invoking the Cart to Order flow core action, you must invoke this method to correctly track your orders for GMV (Gross Merchandise Value) recognition.

### licenseCompliance(cartId, orderId)

If you implement your own cart-to-order process without invoking the Cart to Order flow core action, you must invoke this method to correctly track your orders for GMV (Gross Merchandise Value) recognition.

#### Signature

public static void licenseCompliance(String cartId, String orderId)

#### Parameters

- **cartId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The cartId of a web cart from which an order is created.
- **orderId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    The orderId of the order you created from the cart.

#### Return Value

Type: Void