Developers / Events and webhooks
Start building

Events and webhooks

Which shop events Gears can react to, and how incoming payment webhooks from Stripe, PayPal and Paddle are handled.

Updated Developers

Shop events

Gears react to events with on:

JavaScript
on: {
  "order.placed": async (ctx, order) => {},    // a pay-later order was placed
  "order.paid": async (ctx, order) => {},      // payment confirmed (card, PayPal…)
  "order.delivered": async (ctx, order) => {}, // a shipment was marked delivered
},

Events never block the shopper. An error is logged to the site's log and the shop carries on. The Meta Pixel and TikTok Pixel Gears use these events to send purchases to their ad platforms.

EventWhenData
order.createdEvery new orderThe order
order.placedA pay-later order was placedThe order
order.paidPayment confirmedThe order
order.fulfilled, order.delivered, order.refundedShipped, delivered, refundedThe order
booking.confirmedA booking is confirmed (paid, or nothing to pay){ id, service, staff, startsAt, endsAt, status, customer, paid, currency }
form.submittedA form message that isn't spam{ id, form, data, page, createdAt }
subscriber.addedSomeone joins the newsletter (after confirming, with double opt-in){ id, email, name, status, consentAt, confirmedAt, country, page, tags }
subscriber.removedSomeone unsubscribesThe same, with unsubscribedAt

Preview (test) orders, bookings and messages carry test: true; the email-list and Webhooks Gears skip them. The email-list Gears (Mailchimp, Klaviyo, Brevo, MailerLite, Kit) use subscriber.added and subscriber.removed.

Incoming webhooks

Payment providers call a Gear's route on the site's own address:

ProviderAddressChecked with
Stripe/_vorjo/gears/stripe/webhookStripe's signature (HMAC, 5-minute tolerance)
PayPal/_vorjo/gears/paypal/webhookPayPal's verify-webhook-signature API
Paddle/_vorjo/gears/paddle/webhookPaddle-Signature (ts=…;h1=…, HMAC-SHA256 of ts:body with the destination's secret key, 5-minute tolerance); a repeated notification id is answered but not acted on

Owners connect the Stripe and Paddle webhooks with one click (Connect webhooks on the Gear). Payment status is always confirmed with the provider, not taken from the webhook body alone.

Webhooks to your own server

A hosted Gear gets signed webhooks on your own server: order.created, order.paid, order.fulfilled, order.refunded, product.updated, customer.created, app.installed and app.uninstalled, each with an HMAC-SHA256 signature, a delivery ID and retries. See Webhooks in the hosted Gears guide for the headers and how to verify them.

Webhooks to the owner's tools (Zapier, Make, n8n)

Site owners send events to their own web addresses in Settings › Developers › Webhooks (the Webhooks Gear opens the same page): up to 10 endpoints, each with its own events (ticked one by one, or all) and signing secret, a delivery log (the Logs tab), replays and test events. The body is { id, type, site, createdAt, data }, signed like a hosted Gear's webhook. Every event, its payload and the headers are in Webhook events.

Owners also get email alerts for new orders, bookings and messages.

Esc
Developer docs
Developer overviewHow a Vorjo site is put together, and the ways to build on it - the public API, the REST API and webhooks, the site toolkit and Gears.Shop and content APIEvery address a site uses for its products, checkout, orders, blog, content, forms, bookings, reviews and accounts, plus the admin routes.AI agents (MCP)Connect Claude, ChatGPT, Cursor or any MCP client to your Vorjo sites. It manages orders, products, bookings and messages, asks the Studio for changes and publishes, with the access you allow.Site REST APIRead a site's orders, products, bookings, contacts, invoices, form entries and subscribers, and make changes, with an API key from Settings › Developers.The site toolkit (React)The hooks and components every Vorjo site uses for its shop, blog, content, forms, bookings, reviews and SEO.GearsHow Gears (add-ons) are built - one module with a manifest that plugs into payments, the page head, routes, events and widget slots.
↑ ↓ to moveEnter to openEsc to close