Blog/BigCommerce and Magento: Adding Prescription Requirements to Any Platform
TutorialsFebruary 5, 2026|7 min read

BigCommerce and Magento: Adding Prescription Requirements to Any Platform

Rx

RxCompliant Team

Prescription verification experts

While Shopify and WooCommerce dominate the ecommerce landscape, many medical device retailers run their stores on BigCommerce, Magento (Adobe Commerce), or other platforms. The good news: prescription verification works on any platform. Here is how to set it up.

BigCommerce Integration

Method 1: Script Manager

BigCommerce's Script Manager makes it straightforward to add the RxCompliant widget:

  1. In your BigCommerce admin, go to Storefront > Script Manager
  2. Click Create a Script
  3. Configure the script:
    • Name: RxCompliant Prescription Widget
    • Placement: Footer
    • Location: Storefront pages only
    • Pages: Product pages
    • Script type: Script URL
  4. Enter the script URL: https://rxcompliant.com/embed/rx-widget.js
  5. Add data attributes for your Store ID

Method 2: Stencil Theme Modification

For more control, edit your Stencil theme directly:

  1. Use the BigCommerce Stencil CLI to pull your theme files
  2. Open templates/pages/product.html
  3. Add the widget container where you want it to appear (typically near the Add to Cart button)
  4. Add the script reference in your theme's footer partial
  5. Push the updated theme

The widget automatically detects BigCommerce product IDs and integrates with the cart. Use product custom fields to mark which products require prescriptions — add a custom field named rx_required with value true.

BigCommerce Webhooks

BigCommerce supports webhooks that can trigger prescription verification at order creation:

POST https://api.bigcommerce.com/stores/{store_hash}/v3/hooks
{
  "scope": "store/order/created",
  "destination": "https://api.rxcompliant.com/v1/webhooks/bigcommerce",
  "headers": {
    "X-RxCompliant-Store": "YOUR_STORE_ID"
  }
}

Magento (Adobe Commerce) Integration

Method 1: CMS Block

Add the RxCompliant widget through a Magento CMS block:

  1. In your Magento admin, go to Content > Blocks
  2. Create a new block named "Prescription Widget"
  3. Add the widget HTML and script reference
  4. Insert the block into your product page layout using XML layout updates

Method 2: Custom Module

For a production-grade integration, create a Magento module:

  1. Create a module directory structure under app/code/RxCompliant/PrescriptionGate
  2. Register the module with registration.php and module.xml
  3. Create a product attribute (rx_required) to flag prescription products
  4. Add a layout XML file that injects the widget on product pages for flagged products
  5. Implement an observer for the sales_order_place_after event to trigger verification via the RxCompliant API

Magento REST API Integration

Magento's REST API can be combined with RxCompliant's API for a seamless backend integration:

// In your order observer
$verification = $rxClient->createVerification([
    'order_id' => $order->getIncrementId(),
    'product_id' => $item->getProductId(),
    'patient_name' => $order->getCustomerName(),
]);

// Set order status to "Pending Verification"
$order->setState('holded');
$order->setStatus('pending_rx_verification');
$order->save();

Custom Platforms

If you run a custom ecommerce platform, you have two integration options:

Option 1: Widget Embed

Add a single script tag to your product pages:

<script src="https://rxcompliant.com/embed/rx-widget.js"
  data-store-id="YOUR_STORE_ID"
  data-product-id="YOUR_PRODUCT_ID">
</script>

The widget handles the upload UI, communicates with the RxCompliant API, and fires JavaScript events when verification completes. Listen for these events to control your checkout flow:

window.addEventListener('rxcompliant:verified', function(e) {
  // Enable the add-to-cart button
  document.querySelector('#add-to-cart').disabled = false;
});

window.addEventListener('rxcompliant:rejected', function(e) {
  // Show rejection message
  alert('Prescription could not be verified: ' + e.detail.reason);
});

Option 2: Full API Integration

For complete control, use the REST API directly. Build your own upload UI, submit prescriptions to the RxCompliant API, and handle the verification flow entirely within your platform. See our API Integration Guide for detailed documentation.

Platform-Agnostic Best Practices

Regardless of your ecommerce platform, follow these best practices:

  • Test thoroughly — verify the widget renders correctly on all product page templates
  • Mobile responsiveness — ensure the upload widget works well on mobile devices, where many customers shop
  • Error handling — provide clear error messages when uploads fail or prescriptions are rejected
  • Order management — integrate verification status with your order management workflow so staff know which orders are pending prescription approval
  • Inventory management — consider how prescription requirements affect inventory holds and backorder handling

RxCompliant works with every major ecommerce platform and any custom solution. Create your free account to get your Store ID and API key, and start integrating today.

Start verifying prescriptions today

Add AI-powered prescription verification to your store in under 10 minutes. Free to start, no credit card required.

Create free account →

Related articles