Blog/How to Add a Prescription Gate to Your Shopify Store
TutorialsMarch 5, 2026|8 min read

How to Add a Prescription Gate to Your Shopify Store

Rx

RxCompliant Team

Prescription verification experts

If you run a Shopify store selling regulated medical devices — CPAP machines, nebulizers, hearing aids, or other prescription-required DME — you need a way to gate those products behind a prescription verification step. This tutorial walks you through the process using RxCompliant.

What Is a Prescription Gate?

A prescription gate is a mechanism that prevents customers from completing a purchase of a regulated product until they have uploaded a valid prescription and it has been verified. Think of it like an age gate for alcohol, but for medical prescriptions.

On a Shopify store, this typically manifests as a widget on the product page that replaces or disables the "Add to Cart" button until the prescription verification step is completed.

Step 1: Create Your RxCompliant Account

Head to rxcompliant.com/signup and create a free account. The free tier includes 25 prescription verifications per month, which is plenty for testing and low-volume stores.

Once registered, you will land on your merchant dashboard. Here you will find your Store ID and API key, which you will need for the integration.

Step 2: Install the RxCompliant Shopify App

The easiest way to integrate with Shopify is through our official Shopify app:

  1. From your Shopify admin, go to Apps > Search apps
  2. Search for "RxCompliant" in the Shopify App Store
  3. Click Install and authorize the requested permissions
  4. The app will automatically connect to your RxCompliant account

Alternatively, you can use the script tag method described below if you prefer a manual installation.

Step 3: Add the Widget Script (Manual Method)

If you prefer not to use the Shopify app, you can add the prescription gate widget directly to your theme. In your Shopify admin:

  1. Go to Online Store > Themes > Edit Code
  2. Open your theme.liquid file (or the relevant product template)
  3. Add the following script tag before the closing </body> tag:
<script src="https://rxcompliant.com/embed/rx-widget.js"
  data-store-id="YOUR_STORE_ID"
  data-product-id="{{ product.id }}">
</script>

Step 4: Configure Product Tagging

Not every product in your store requires a prescription. You need to tell RxCompliant which products should be gated. There are two approaches:

Option A: Tag-based (recommended)

Add a tag called rx-required to any Shopify product that requires a prescription. RxCompliant will automatically detect this tag and show the prescription upload widget only on tagged products.

Option B: Dashboard configuration

In your RxCompliant dashboard, go to Settings > Product Rules and manually enter the Shopify product IDs that require prescriptions.

Step 5: Set Up Verification Rules

In your RxCompliant dashboard, configure your verification preferences:

  • Auto-approve threshold — set the AI confidence level above which prescriptions are automatically approved (recommended: 90%)
  • NPI verification — enable or disable automatic NPI lookup (recommended: enabled)
  • Prescription expiry — set the maximum age of accepted prescriptions (common: 12 months)
  • Notification emails — get notified when prescriptions need manual review

Step 6: Test the Integration

Before going live, test the entire flow:

  1. Navigate to a tagged product page on your store
  2. Verify that the prescription upload widget appears
  3. Upload a test prescription document
  4. Check your RxCompliant dashboard to see the verification result
  5. Confirm that the "Add to Cart" button is enabled after approval

Step 7: Customize the Widget Appearance

The RxCompliant widget is designed to blend with any Shopify theme, but you can customize it further:

  • Colors — match your brand's primary color scheme
  • Text — customize the upload prompt, success message, and error messages
  • Position — place the widget above or below the add-to-cart button

All customization options are available in your RxCompliant dashboard under Settings > Widget.

Going Live

Once you have tested everything, your prescription gate is live. Customers visiting regulated product pages will see the upload widget. They upload their prescription, AI verifies it in seconds, and only then can they add the product to their cart.

Your RxCompliant dashboard gives you a full audit trail of every verification — when it was submitted, what the AI detected, whether NPI was validated, and the final approval status. This is exactly what you need for compliance audits.

Ready to get started? Create your free RxCompliant account and have your Shopify prescription gate running in under 10 minutes.

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