Available front-end objects for the Recharge Checkout on BigCommerce

🚧

Note: As part of Recharge's ongoing efforts to streamline and enhance its platform, Recharge plans to discontinue support for BigCommerce by December 31, 2025. Recharge strongly recommends that all merchants currently using BigCommerce begin the process of migrating to Shopify, which Recharge will continue to support moving forward. See Shopify’s guide on Migrating to Shopify.

📘

Platform:

  • Recharge Checkout on BigCommerce

RCAInterface

The RCAInterface object contains functions you can use to perform tasks such as retrieving cart data, store settings and more.

RCAInterface Object

{
adapter: {getAdapterBackendSettings(){}},
bigcommerce: {convertWordpressCart(){}, getWordpressCurrentCart(){}},
cart: {cartTotal(){}, itemPrice(){}, hasSubscription(){}},
checkout: {createPayload(), performCheckout()},
localeMessages: {en: {…}},
recharge: {getRechargeSettings(){}, getRechargeTempToken()},
settings: {adapterSettings()},
subscription: {addSubscription(), getSubscriptions(), updateSubscription(), removeSubscription(), addProductToSubscriptions()}
}

RCA_PRODUCT_DATA

The RCA_Product_data object contains information about all products in a store, including:

  • The BigCommerce product ID
  • Tax class ID
  • weight
  • Subscription interval information
  • Any discounts applied to the subscription

Example

{
    "id": 113,
    "weight": 1,
    "variants": [
      {
        "id": 81,
        "weight": 1,
        "tax_code": null,
        "tax_class_id": ""
      }
    ],
    "discounts": [],
    "subscriptions": [
      {
        "discount_amount": 5,
        "discount_type": "percentage",
        "charge_interval_frequency": 30,
        "order_interval_unit": "day",
        "storefront_purchase_options": "subscription_and_onetime",
        "expire_after_specific_number_of_charges": null,
        "order_interval_frequency_options": [
          "30"
        ]
      }
    ],
    "tax_code": ""
  }

RCA_STORE_DATA

The RCA_STORE_DATA object contains the following:

  • The store URL as it's stored in Recharge.
  • The store hash for your store, which is its unique identifier on BigCommerce.
  • Your store's unit of measurement as set in Recharge.

Example

{"rc_domain": "tarek-bc.mybigcommerce.com", "hash": "5ig8b3hcgj", "weight_units": "KGS"}