Set Up Your Store
Once Vendwick is installed and deployed, these steps take you from an empty store to a first test purchase. Stay in test mode until a purchase, a renewal and a refund have worked with each payment provider you plan to use.
First run
- Check the wiring.
/_vendwick/healthshould answer. The admin Store overview and Store settings, General show whether email, scheduled tasks and private file storage are available. - Run the setup wizard. The Store overview and the General page link to it (Setup guide). It walks through six steps, each of which you can skip and come back to: store basics (name, currency, country, support email), payments, tax, your first product, a test purchase and going live.
- Stay in test mode.
payment_modestarts astest. The wizard’s "Test gateway" (the mock gateway,payments_mock_gateways) lets you buy something with no provider account. - Enter gateway keys on Payments, test keys first. Each credential has a test and a live copy.
- Add webhooks in each provider’s dashboard:
https://<your-site>/_vendwick/webhook/<stripe|paypal|razorpay|polar>. Enable every event listed for that provider in Payment Gateways: Stripe, PayPal, Razorpay and Polar, including the refund and dispute events. PayPal also needs its webhook id saved, or every PayPal webhook is refused. - Check currency routing on Payments. The defaults send USD to Stripe, PayPal and Polar, EUR to Stripe and PayPal, and INR to Razorpay.
- Create a product and a plan under Products:
plugin,theme,emdash,digital,service,event,bundleorphysical(the last needs the Physical Goods and Shipping module). Anemdashproduct needs its npm package name. - Upload a release on the product’s Releases tab: a WordPress ZIP whose header names the version, an npm tarball whose
package.jsonmatches the product’s package name and version, or one file for a digital product. Then publish it. - Buy it yourself in test mode, open the receipt’s account link, activate a site through the license API, then refund the order from its page in Orders and see the license disabled.
- Turn on the modules you want under Modules (see below), then switch to live keys and
payment_mode: live.
Upgrading from 0.1.0? Follow Update Vendwick.
Public URLs
Vendwick adds these to your site. ROUTES.md lists every route, generated from the code.
| URL | What it is |
|---|---|
/checkout/ | Native checkout (?product=&plan=, ?coupon=). ?add=product:plan[:qty] (comma-separated) opens it with a cart. The free-order confirmation link also lands here. |
/account/... | Customer portal: orders with shipping and tracking, licenses, sites, downloads, subscriptions, invoices and credit notes, profile and shipping address, "My pages". |
/products/, /products/<slug> | Product index and product pages (with the published product page above the plans). /?product=<slug> also works. |
/_vendwick/webhook/<provider> | Gateway webhooks. |
/_vendwick/go | Short-lived redirect to the provider’s payment page. |
/_vendwick/checkout/status | Return page status after payment. |
/_vendwick/package | Signed WordPress package downloads. |
/_vendwick/download/<token> | Portal and digital downloads. |
/_vendwick/license, /_vendwick/license/<action> | The license API on a store path (EDD style with ?edd_action=, or check, activate, deactivate, version). |
/_vendwick/npm/ | npm registry for EmDash products. |
/_vendwick/invoice | Order invoice or credit note (?order=&key=, &doc=credit-note, &refund=<id>). &format=pdf downloads it as a PDF. |
/_vendwick/pay/<code> | Client invoice pay page (?key=). &format=pdf downloads it as a PDF. |
/_vendwick/access | Page access links. |
/_vendwick/appearance/preview | Preview of unsaved Appearance values (admins only). |
/_vendwick/admin/package-upload | Release upload (admins only). |
/_vendwick/admin/import-upload | Large store import files (admins only, new in 0.2.0). |
/_emdash/api/plugins/vendwick/license/{check,activate,deactivate,version} | The license API. ?edd_action= on any URL reaches it too. |
/_emdash/api/plugins/vendwick/storefront, .../storefront/products, .../storefront/product | Public storefront JSON, with add_to_cart_url per plan. |
/_emdash/api/plugins/vendwick/checkout/quote | Public price quote for a product or a cart. |
/_emdash/api/plugins/vendwick/customer/licenses | A customer’s licenses by access token or portal session. |
The packing slip is an admin action on the order (it opens a printable page from the admin), not a public URL.
Theme components and blocks
@gatilab/emdash-vendwick/astro exports ProductList, Product, Price, BuyButton, CartButton, CartDrawer, Cart, Checkout, Portal, ProductGallery, VendwickAssets, AccessGate and MyPages, plus hasAccess() and the view loaders behind the injected pages.
- Cart:
<BuyButton cart>is an "Add to cart" button,<CartButton>goes in your header and<CartDrawer>once per layout. See Cart and Checkout. - Product pages:
<Product layout="page">renders the full product page (gallery, plan picker, "Buy now" and "Add to cart", schema.org data), the same layout as the injected/products/<slug>page. - Product pages content: once the store is pinned, the "Product pages" content type holds long-form content for a product, shown above its plans. See The Admin, the Sidebar and Product Pages.
The editor gets eight Portable Text blocks: vendwick-product-list, vendwick-product, vendwick-price, vendwick-buy-button (with an "Add to cart" toggle), vendwick-product-gallery, vendwick-checkout, vendwick-portal and vendwick-cart.
The stylesheet uses vw- classes and --vw-* custom properties. The injected pages use Vendwick’s own minimal layout, not your theme’s. See Components, Blocks and Styling.
The license server
Vendwick licenses plugin, theme, emdash and digital products. service, event and physical products sell without keys, and a bundle issues one license for each licensed product in it.
- WordPress plugins and themes use the EDD-compatible API:
check_license,activate_license,deactivate_licenseandget_version, always answered with HTTP 200 JSON. Shipclients/wordpress/class-vendwick-updater.phpin your plugin or theme, or keep using an EDD Software Licensing sample updater. - EmDash plugins get the same API plus the npm registry. Embed
clients/emdash/license-client.ts(no dependencies) for license checks and update notices. Buyers install with two.npmrclines: the scope’s registry and the license key as_authToken. Buyers whose project sets pnpm’sminimumReleaseAgemust add your scope tominimumReleaseAgeExclude, or a fresh release won’t install. - Seats: each license has an activation limit (
0is unlimited). Withstaging_sites_freeon, staging and local URLs don’t use a seat. - Imported stores: products brought in by the store importer keep their old FluentCart or EDD ids and slugs (
legacyItemIds,legacySlugs), and license keys are kept byte for byte, so installed copies that still send the olditem_idoritem_namekeep validating once their updater points at your store. See Import a FluentCart or EDD Store.
Licenses, Releases and the License API has the request and response shapes, the release rules and the registry setup.