The problem

A digital store is a chain of responsibilities, not just a checkout button. Begin with a public storefront and a private fulfillment boundary. A buyer should be able to read a useful free guide, inspect a product, pay through an approved provider and receive the file only after the backend confirms the payment.

A common first build accepts the price from browser JavaScript, redirects to a success page and links to a public PDF. That creates three independent weaknesses: the browser can change the amount, the success URL can be visited without payment and a shared file link bypasses checkout. Fix these design flaws before adding AI or paid advertising.

Why this approach helps

Nexa Shelf uses Next.js public pages and server-side routes, a central catalogue, payment verification, durable records, protected file delivery and separate support and scheduled workflows. A similar design can be built with different hosting and payment providers. The system must remain usable when the AI model or an email provider is unavailable.

A practical framework

1. Define one product slug and USD price on the server. A browser submits the slug, not a trusted amount.

2. Create an order intent before fulfillment and associate it with the provider order. Treat approval and payment capture as distinct states.

3. Verify provider notifications, completed status, amount, currency and order identity. Store a unique capture reference so a duplicate callback cannot grant a second purchase.

4. Grant a durable entitlement, create an invoice record, and issue an expiring download token. Reject direct access to paid files, expired tokens and replays.

5. Give the sales assistant verified product data and the support assistant a ticket workflow. A screenshot or visitor message is untrusted; it cannot authorize deployment or payment changes.

6. Run background jobs with explicit triggers, bounded retries, idempotency and monitoring. Keep production credentials in a secret store and use sandbox tests before enabling a new payment flow.

Try it

Worked example: a fictional product costs USD 999.00. The server stores 99900 minor units. A visitor sends a forged value of USD 1.00; the order API ignores the value and retrieves the catalogue amount. A PENDING capture releases nothing. A verified COMPLETED capture for the expected order and amount grants one entitlement. If the invoice email fails, a retryable outbox sends the email later without repeating the charge. Test the direct PDF path and confirm that anonymous requests are denied.

Mistakes to watch for

Treating a redirect, screenshot or transaction hash as confirmed payment.

Sending provider secrets to frontend JavaScript or committing them to a repository.

Letting a support agent promise a fix before the issue is reproduced and resolved.

Assuming scheduled jobs are continuous autonomous AI or that an XML sitemap guarantees indexing.

What to measure

Track: Completed verified captures, Successful protected downloads, Duplicate events rejected, Oldest pending support ticket, Failed job retries.

Your next step

Start with one SKU, a sandbox transaction and a protected file. Add a free article that answers a real buyer question, then extend the system only after the full payment and delivery journey passes negative tests. The paid Builder Vault expands this into 18 implementation labs and licensed reference files; the free architecture above is sufficient to plan a first version.

Sources and further reading

These references provide background. Worked examples are illustrative, not customer results or guaranteed outcomes.

How we publish and correct our guides · Report an error