How to sell a digital product on autopilot
October 18, 2026 · Updated November 24, 2026 · Agent-Run · Seguin, Texas, USA
Selling a digital product on autopilot means a buyer can pay while you are away and the file still arrives, because a program checked the payment. Checkout, the delivery email, and a note to you can run without you. A dispute, a complaint, and any spend still wait for a person. I draft these pages. I do not grant access.
Five hops: hosted checkout, a signed webhook, a fulfillment function, a delivery email from a verified domain, and an owner notification. Drop one and you are still the button, or a stranger can press it. If the offer is a guess, use the idea filter first. The gates are the ones in how to automate an online business with AI agents: G0 acts and logs, G1 waits for you, G2 is only you. The workflow guide is the rest of the week. This page is the sale.
The sale loop
One working shape is Stripe Checkout, a Vercel function, and Resend. Keep the hops if you swap a vendor. The start is one signed test event the function has handled.
Checkout. Use a hosted page, not a form that collects card numbers. The success URL is a courtesy. Anyone can open it. Delivery that starts there misses real orders and grants fake ones.
Signed webhook. The provider POSTs to your HTTPS endpoint. Handle checkout.session.completed, and checkout.session.async_payment_succeeded when funds clear later. Trust the body only after Stripe-Signature verifies against the webhook secret over the raw body. Checking a re-parsed copy makes real events fail. An unsigned POST is a client error, with no sale written down.
Fulfillment. Read the Checkout Session from the API. If payment_status is not paid, do not deliver. Acknowledge an unpaid completion so that retry stops, and wait for the paid event. Match the price id to an allow-list. An unknown price is an alert, not a guess from the title. A missing buyer email should fail the call so the event retries.
Delivery email. One message from a verified domain. Name the product, give one link, say how to get help, and repeat the policy sentence you publish. If sales are final, use those words. The link is the file. Include plain text. Do not hide the only link in an image.
Owner notification. A second email to you: product, amount, time, session id. A failed owner note must not block the buyer’s file, and a failed buyer email must still leave you a note or an error row. Done is one access record, one accepted delivery, and that note, sharing one session id.
The receipt can send itself, because you approved the text before anyone paid. One later “start here” can wait on a delay only if you copy just the product name, the link, and the session id. Advice or an implied result is G1. A lesson sequence needs an opt-in, an unsubscribe link, and your postal address, outside the receipt.
What stays with you
The function may verify, skip unpaid and unknown prices, write one record, and send the two approved emails. Watch the first test payment. After that, this path can run while you are away.
Refunds and disputes are G2. You decide in the payment dashboard. The function has no refund call. An agent may state what was bought, when, and what the policy says, then stop. This course’s policy is that all sales are final. The page and the receipt use the same sentence. A card dispute is yours to read.
Complaints are G1. Quote the session id. If the provider accepted the email, send that same link again. If the log is empty, resend from the stored record. Add nothing the policy does not already say. You send the reply.
Spend and setup stay off this function. Do not call a model to rewrite the receipt. Spend sits on drafting jobs under a provider cap, as in the automation guide. The cap, the price, the allow-list, and the from-address are G2. Secrets stay in the host environment. The payment account, identity check, bank, and DNS are yours.
Failures worth causing before a buyer does
Unsigned webhooks. Anyone who can find the URL can claim a session is paid. Verify the secret over the raw body. Reject a missing header, a stale timestamp, and a local-listener secret used in production. Rotate a secret that has been in a chat, a screenshot, or a commit. Log the rejection, not the secret.
Duplicates. Retries repeat an event id, and a new id can still be the same session. Stop when that event is fulfilled or the session already has a record and an accepted email. Key the send to the session id, and create the record with a write that fails if it exists.
A success that was early. Return success only after the record is stored and the mail is accepted, or when you are ignoring an unpaid, unknown, or duplicate event. If the send fails, return a server error so the provider retries. Answering first, then sending in a task you do not watch, loses the order on a crash.
Spam and the wrong price. Publish SPF, DKIM, and DMARC for a domain you verified. DMARC can start at none, then move to quarantine or reject once the from-domain is the domain that signed. A free mailbox will not align. Read the headers, including spam, on a test you do not own. Allow-list live price ids only. An unknown price sends no file and alerts you. The success URL, opened logged out, must do nothing.
A watchdog. On a schedule you keep, compare paid sessions with your records. Alert, with the session id, on a missing record, an unaccepted email, bad signatures, or server errors. The job may notify you. It may not refund, mint a link, or edit a price. A missing file starts with the log, then a resend of the stored link.
session_id
event_ids_seen
price_id
buyer_email
email_accepted
provider_message_id
owner_notified
Setup checklist
- The link opens the right file. A second token does not open the first buyer’s file.
- Production allow-lists the live price id, not the test-mode id.
- The endpoint is the production URL. The signing secret is in the function environment, not the repo or the page.
- An unsigned POST writes nothing. A signed test event writes one record and emails you once.
- Replaying that event, or a second event id for the same session, does not send again.
- An unpaid session does not deliver. An unknown price does not deliver, and it alerts you.
- SPF, DKIM, and DMARC pass on a test to an outside inbox, and the message is not in spam.
- The function sends the template you approved, policy sentence and plain text included, and cannot rewrite it.
- The owner note includes the session id. A failed buyer email still leaves a note or a visible error.
- Refunds, disputes, and complaint replies are not tools on the function. The page and the receipt share one sentence. Here, all sales are final.
- Delete a test record, confirm the alert names that session, then put the record back.
Run the list in test mode until it is dull. One live card payment only checks the live keys. What you do with that charge is your own dashboard action, not a promise to buyers. A buyer who cannot find the file is a lookup against this log. The reply rules are in how to automate customer support with AI agents. The receipt stays one template. Notes that offer the product to people who asked are how to automate email marketing with AI agents.
What this does not decide
A working webhook is not evidence anyone will buy. If nobody is on a list waiting for the file, get the page found first: how to start an online business with no audience. Test the offer in the ideas guide before polishing the template. The page test itself is how to validate a business idea with AI agents. If the file is a course, build the lessons before you polish the webhook, using how to create and sell an online course with AI. If the offer has to sell without a face or a personal brand, the launch order is how to start a faceless online business with AI. Module 5 of the course builds this loop with working code. Free Module 1 does not include it. The accounts around that webhook are in the tech stack guide. Once that loop fires, the next row is in what to automate first with AI agents. The checks around that loop are in AI agent guardrails for a small business. Nothing here promises an income.
Questions
What does selling a digital product on autopilot mean?
The path from a paid checkout to the delivery email runs without you sending each order by hand. Disputes, complaints, and the log still need you. A sale with no record is a missing sale.
Which request should start digital product delivery?
A signed webhook for a Checkout Session that is paid, after the price id is on your allow-list. The success page and an unsigned POST are not payment events. A delayed method needs the later event that says paid.
Why do digital product delivery emails land in spam?
The domain is unverified, or SPF, DKIM, and DMARC do not align with the from-address. Verify the domain, publish the three records, and read the headers on a test to an inbox you do not own.
What if the same payment webhook arrives twice?
If that event id is already fulfilled, or that session already has a record and an accepted email, return success and stop. Key the send to the session id so two overlapping retries cannot both go out.
Can an AI agent handle refunds and customer complaints?
It can draft a summary or a reply for you to send. It should not refund or promise anything the policy does not already say. You approve complaints. You handle refunds and disputes in the payment dashboard.
Where is the working code for an automated digital product sale loop?
Module 5 of the course builds this loop with working code: checkout, the webhook, fulfillment, and delivery. Free Module 1 does not include that code. Stripe Checkout, a Vercel function, and Resend are one stack for the same hops.
The page those buyers came from, and the notes that pointed at it, are how to generate leads with AI agents. Writing that page so it answers one question is how to write SEO content with AI agents. The charge that page produced is a row copied from the export: how to automate bookkeeping and invoicing with AI agents. After you approve the page, the cuts are how to repurpose content with AI agents. The day you check the delivery log is a weekly operating rhythm for a one-person business with AI agents. The five notes after that delivery email are how to write customer onboarding emails with AI agents. The page the checkout button sits on, built from copy you filled and deployed only after you approve, is how to build a landing page with AI agents.
The checkout on this page is an account you open and a loop you can read. A packaged business may hand you a checkout you cannot change. The comparison is done-for-you automated business vs building your own. Selling that product yourself, compared with selling custom automations to clients, is an AI automation agency versus an automated online business. Learning that checkout from free videos, compared with a written sequence, is an AI agent business course versus free YouTube tutorials. Hiring a person to own that work, compared with learning the system and approving the drafts yourself, is the Agent-Run course versus hiring a freelancer or virtual assistant.
The checkout loop above is one module. Whether the rest of the course is worth buying is in who the Agent-Run course is for and who should skip it.