Sell protected video, audio and PDFs from your own shop
ViewGate sits between your shop and your content. Your shop takes the payment as it does today. ViewGate gives the buyer a personal access link and enforces the terms you chose, such as one view, 24 hours or a month. It never handles a card and never takes a percentage.
Quick start
- Start a free trial. All you need is your business name and email. We email you a six-digit code; no password, no card.
- Upload a video, an audio recording or a PDF.
- Pick an access rule, such as 24-hour access or Buy to keep, or make your own.
- Send yourself a test code and open it the way a buyer would.
- Connect WooCommerce or Shopify with a webhook (about five minutes, no plugin), then link each product's SKU to the content it unlocks.
The Setup page walks you through these five steps and ticks them off as you go.
Uploading content
Go to Setup, step 1 (or Account), choose a file, give it the title buyers will see, and upload. ViewGate reads the length from the file.
| Kind | Formats | For best results |
|---|---|---|
| Video | MP4, WebM, MOV | Export as MP4 (H.264 video, AAC audio). It plays on every phone and browser. 1080p at 4–6 Mbps is plenty. |
| Audio | MP3, M4A, WAV, OGG, FLAC | MP3 at 128–192 kbps keeps files small and plays everywhere. WAV is very large for the same quality. |
| Document | Any PDF. Each page is displayed on screen with the buyer's email across it, and no file is ever handed to their browser. |
Single uploads go up to the size shown on the upload form. For a large back catalogue, upload by API
(POST /v1/videos/upload with your API key) or ask us to import it.
How your content is protected
- Nothing is public. Files are stored privately and have no address anyone can visit. Only a valid code unlocks them.
- Links expire. When a buyer presses play, their player gets a signed link that works only for that item and dies within minutes. A link copied out of the browser is useless soon after.
- No download button. Video and audio stream. PDFs are drawn page by page on screen, so the browser has no file to save or print.
- Watermarked to the buyer. Their email address appears over the video and across every PDF page, so a leak can be traced to its source.
- Device and sharing limits. Each code works on a set number of devices, usually 3, and one at a time, so a code passed round a group chat stops working.
- Instant withdrawal. Refund or revoke a code and playback stops within seconds, even mid-way through.
Access rules
An access rule decides how long a code works, how many times, and on how many devices. Every new account starts with these. In Studio you can adjust any of them and save your own version. A code always keeps the rule it was sold under, even if you change the rule later.
| Rule | What the buyer gets |
|---|
For audio, "a view" means a listen. For a PDF, it means opening it, and time limits count the time it is open and on screen.
WooCommerce
No plugin needed. WooCommerce already sends a signed message when an order changes; you point it at ViewGate.
1. Connect
- In ViewGate, open Setup › step 4 › WooCommerce, and click Connect WooCommerce. Keep the page open: it shows a Delivery URL and a Secret.
- In WordPress, go to WooCommerce › Settings › Advanced › Webhooks and click Add webhook.
- Fill in: Name
ViewGate· Status Active · Topic Order updated · Delivery URL and Secret from ViewGate · API version WP REST API Integration v3. - Click Save webhook. WooCommerce sends a test ping, and ViewGate's Setup page shows Webhook connected.
2. Set up your products
- Create the product as normal, with its price, description and image.
- Tick Virtual so no shipping is charged. Leave Downloadable unticked: ViewGate delivers it, so there's no file to attach.
- On the Inventory tab, give it a SKU, e.g.
WORKSHOP-01. - In ViewGate Setup, step 5, link that SKU to the content and the access rule. You can use the product ID instead of a SKU.
What happens on each order
| Order status | ViewGate |
|---|---|
| Processing / Completed | Issues one code per item (one per unit if they bought several) and emails the buyer their links. |
| Pending payment / On hold | Waits. For EFT, the codes go out when you mark the order paid. |
| Refunded / Cancelled | Revokes the codes from that order. Playback in progress stops. |
WooCommerce sometimes sends the same message more than once. That's safe: the buyer always gets the same code, and is only emailed once. A partial refund doesn't change the order status, so revoke that code by hand in Studio.
Shopify
No app to install. Shopify's own webhooks tell ViewGate about paid orders and refunds.
1. Connect
- In ViewGate, open Setup › step 4 › Shopify and copy the Webhook URL.
- In Shopify admin, go to Settings › Notifications, scroll to Webhooks, and click Create webhook.
- Event Order payment, format JSON, paste the URL, and save.
- Create two more webhooks to the same URL: Refund create and Order cancellation.
- Shopify shows "Your webhooks will be signed with …" under the list. Copy that key into ViewGate and click Connect Shopify.
2. Set up your products
- On the product, untick This is a physical product so no shipping is charged.
- Give the variant a SKU in its Inventory section, e.g.
AUDIO-MEDITATION. - In ViewGate Setup, step 5, link the SKU to the content and access rule. A product or variant ID also works.
Shopify still sends its normal order confirmation. ViewGate sends the access link in a separate email, in your shop's name. It helps to add a line to your Order confirmation template (Settings › Notifications), e.g. "Your access link will arrive in a separate email within a minute."
A refund that includes the product revokes its code. A refund of shipping only, or a goodwill amount, leaves access alone.
Embed on your site
Want buyers to watch, listen or read on your own website rather than on a separate page? Paste this onto any page (WordPress Custom HTML block, Shopify Custom Liquid section, or plain HTML). Your exact snippet, with your account ID filled in, is on the Setup page.
<div data-viewgate="YOUR-ACCOUNT-ID"></div> <script src="https://viewgate.2nth.ai/embed.js" async></script>
It shows a code box in your colours. The buyer types the code from their email and the content plays in place.
Add data-code="ABC-DEF-GHI" to open a specific code, or link to your page with ?vg_code=ABC-DEF-GHI
and the code is filled in. If your editor strips scripts, use the <iframe> version shown on the Setup page.
API for any other system
Anything that can make one HTTP request after a sale can issue a code: a custom website, Payload, Zapier, Make, an invoicing tool.
Authentication
Create a key in Setup › step 4 › Other system. Send it as Authorization: Bearer vg_live_….
Keep it on your server: anyone with the key can issue codes on your account. Revoke it from the same page at any time.
Issue a code
POST /v1/grants
{
"videoId": "vid_xxxxxxxx", // the content (IDs are listed on the Setup page)
"policyId": "pol_one-day_…", // the access rule
"subject": "buyer@example.com", // shown as the watermark
"externalRef": "order-1001", // your order number: retries return the same code
"source": "my-shop"
}
→ 201 {
"code": "K7M-P3Q-XR9",
"shareUrl": "https://viewgate.2nth.ai/w/K7M-P3Q-XR9",
"policy": { "name": "24-hour access", "summary": "…" }
}ViewGate doesn't email buyers for API-issued codes. You send shareUrl however suits you: an order email, an SMS, or a
"your purchases" page. The emailed links in the WooCommerce and Shopify flows are sent for you.
Other calls
| Call | Does |
|---|---|
POST /v1/grants/:code/revoke | Withdraws access immediately, e.g. on a refund. Body: {"reason":"refunded"} |
GET /v1/videos | Lists your content with IDs and kinds. |
GET /v1/policies | Lists your access rules with IDs. |
GET /v1/reports/grants | Every code: who, what, how much used, how much left. |
POST /v1/videos/upload | Multipart upload: file, title, durationSeconds. |
Example: PHP, after payment
$res = wp_remote_post('https://viewgate.2nth.ai/v1/grants', [
'headers' => [
'Authorization' => 'Bearer ' . VIEWGATE_KEY,
'Content-Type' => 'application/json',
],
'body' => wp_json_encode([
'videoId' => 'vid_xxxxxxxx',
'policyId' => 'pol_one-day_…',
'subject' => $order->get_billing_email(),
'externalRef' => 'wc-' . $order->get_id(),
]),
]);
$link = json_decode(wp_remote_retrieve_body($res))->shareUrl;What your buyer sees
- An email in your shop's name with a button for each item: Watch now, Listen now or Read now.
- A page in your logo and colours (on Studio plans and up) showing the title and their terms, e.g. "24 hours from first play".
- Time or views left, shown as they go. If they stop and come back within the resume window, it continues the same view.
They don't need an account or a password. The code is the key, and it's tied to their email by the watermark.
Questions
The buyer didn't get their email
Look at Shop activity on the Setup page. It shows the last message from your shop and what ViewGate did with it.
"Not linked to content" means the product's SKU isn't linked in step 5. The buyer can also use the code directly at
/w, and you can find every code in Studio under Grants issued.
"Rejected a request with the wrong secret"
The secret in WooCommerce, or the signing key you gave us from Shopify, doesn't match. Copy it again from the Setup page or from Shopify.
A buyer says it won't play
The message on their page says why: time ended, views used, or open on another device. A video that "can't be decoded" needs re-exporting as MP4 (H.264). You can issue them a fresh code from Studio at any time.
Can I sell a bundle?
Yes. Link one SKU to several items in step 5. The buyer gets one code per item, all in the same email.
Can buyers gift a copy?
Yes. If they buy a quantity of 3, they get three separate codes and can pass two on.