Documentation

Add prescription verification to any ecommerce store in minutes. One script tag, works everywhere.

How RxCompliant Works

1

Customer uploads

A drag-and-drop widget on the product page lets customers upload their prescription (PDF, JPG, or PNG). Add-to-cart is blocked until verified.

2

AI verifies instantly

RxCompliant's AI analyzes the document in under 30 seconds — checking for provider letterhead, valid signature, prescription date, and patient/item details.

3

NPI federal lookup

The prescribing doctor's NPI number is verified against the federal registry (npiregistry.cms.hhs.gov) to confirm they are authorized to prescribe.

4

Auto-approve or manual review

Set a confidence threshold to auto-approve high-confidence prescriptions. Lower-confidence ones go to your dashboard for manual review.

5

Customer notified

Once approved, the customer can add the product to their cart and complete checkout. Email notifications keep them informed of approval or rejection.

Integration Guide

Quick Start (Universal)

The RxCompliant widget works on any website. Add the script tag and mark products that require prescriptions.

1. Sign up to get your API key. 2. Add the script tag to your site. 3. Add data-requires-rx to prescription products.

product-page.html
<!-- Add to your store's <head> or before </body> -->
<script src="https://rxcompliant.com/widget/rxcompliant.js"
        data-api-key="YOUR_API_KEY"
        data-color="#DC2626">
</script>

<!-- Add to any product that requires a prescription -->
<div data-requires-rx
     data-product-id="PRODUCT_ID"
     data-product-title="Product Name"
     data-platform="custom">
</div>

The widget automatically attaches to any element with data-requires-rx and blocks add-to-cart until a valid prescription is uploaded.

Widget Configuration

Configure the widget using data-* attributes on the script tag.

AttributeRequiredDefaultDescription
data-api-keyYes-Your RxCompliant API key (starts with rxk_)
data-colorNo#DC2626Primary widget color (hex)
data-api-urlNohttps://rxcompliant.comAPI endpoint URL (for self-hosted)
data-btn-textNoUpload PrescriptionButton text label
data-max-sizeNo10Max file size in MB
data-positionNobeforeWidget position relative to the target element (before or after)
data-selectorNo[data-requires-rx]CSS selector for prescription product containers

Product Element Attributes

These attributes go on the div element that marks a product as requiring a prescription.

AttributeRequiredDescription
data-requires-rxYesMarker attribute (no value needed) that identifies this product as requiring a prescription
data-product-idRecommendedUnique product ID from your store
data-product-titleRecommendedProduct display name (shown in the widget)
data-platformNoPlatform identifier: shopify, woocommerce, bigcommerce, magento, wix, or custom

API Reference

Use the REST API for server-side integrations, custom workflows, or to build your own upload UI.

POST/api/upload

Upload a prescription file for AI verification. Returns a verification token, status, confidence score, and NPI verification result.

Request

cURL
curl -X POST https://rxcompliant.com/api/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "prescription=@prescription.pdf" \
  -F "product_id=123" \
  -F "product_title=CPAP Machine" \
  -F "platform=custom" \
  -F "store_url=https://yourstore.com"

Parameters (multipart/form-data)

FieldTypeRequiredDescription
prescriptionFileYesThe prescription file (PDF, JPG, PNG, HEIC, WebP)
product_idStringYesProduct identifier
product_titleStringYesProduct display name
platformStringNoPlatform: shopify, woocommerce, bigcommerce, magento, wix, custom
store_urlStringNoStore origin URL
customer_emailStringNoCustomer email for notification

Response

JSON Response
{
  "success": true,
  "token": "rxc_abc123def456",
  "status": "APPROVED",     // APPROVED | PENDING | REJECTED
  "confidence": 94,         // 0-100 AI confidence score
  "npiVerified": true,      // NPI registry verification
  "message": "Prescription verified and approved."
}
GET/api/verify/:token

Check the status of a previously uploaded prescription by its token.

Request

cURL
curl -X GET https://rxcompliant.com/api/verify/rxc_abc123def456 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

JSON Response
{
  "success": true,
  "token": "rxc_abc123def456",
  "status": "APPROVED",
  "confidence": 94,
  "npiVerified": true,
  "uploadedAt": "2026-03-15T10:30:00Z",
  "productId": "123",
  "productTitle": "CPAP Machine",
  "customerEmail": "patient@example.com"
}

Ready to get started?

Sign up for free and start verifying prescriptions in minutes.

Create free account