Mayar
Mayar membership for STARTER and storefront payment links.
Mayar is the default paymentsProvider and the only gateway used for marketing Solo/Pro payment links.
Environment variables
| Key | Used for |
|---|---|
MAYAR_API_KEY | Membership / API client |
MAYAR_WEBHOOK_SECRET | Webhook auth |
MAYAR_PRODUCT_ID_SOLO / MAYAR_PRODUCT_ID_PRO | Storefront webhook filter |
MAYAR_PAYMENT_LINK_SOLO / MAYAR_PAYMENT_LINK_PRO | Storefront checkout URLs |
API bases: sandbox https://api.mayar.club/hl/v2, production https://api.mayar.id/hl/v2.
Storefront (this host)
See Storefront checkout for Solo/Pro payment links and {MARKETING_URL}/api/webhooks/mayar.
SaaS membership (STARTER)
- Create a Membership product with monthly/yearly tiers in Mayar sandbox or production.
- Paste IDs into
lookupKeys.mayarinpackages/payments/src/subscription-plans.ts(productId,tierIds.monthly,tierIds.yearly). - Set
features.paymentsProvidertoPaymentProvider.Mayar. - Set
MAYAR_API_KEYandMAYAR_WEBHOOK_SECRET.
Membership checkout and subscription sync run through Hono billing adapters in packages/api/src/modules/billing/adapters/mayar/. The SaaS dashboard UI lives in the full TurboJet monorepo.
Webhooks
Hosted here: {MARKETING_URL}/api/webhooks/mayar
Send the secret as x-mayar-webhook-secret or Authorization: Bearer ….
On this host the route serves the storefront ack path. Full membership handleWebhook upsert logic exists in the Mayar adapter but is not wired to a separate HTTP route on marketing unless you remount it in a SaaS host.