TurboJet
PaymentsPayment providers

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

KeyUsed for
MAYAR_API_KEYMembership / API client
MAYAR_WEBHOOK_SECRETWebhook auth
MAYAR_PRODUCT_ID_SOLO / MAYAR_PRODUCT_ID_PROStorefront webhook filter
MAYAR_PAYMENT_LINK_SOLO / MAYAR_PAYMENT_LINK_PROStorefront 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)

  1. Create a Membership product with monthly/yearly tiers in Mayar sandbox or production.
  2. Paste IDs into lookupKeys.mayar in packages/payments/src/subscription-plans.ts (productId, tierIds.monthly, tierIds.yearly).
  3. Set features.paymentsProvider to PaymentProvider.Mayar.
  4. Set MAYAR_API_KEY and MAYAR_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.

On this page