@haatlabs-core/billing
v0.10.0
Published
Payment gateways (Stripe, Razorpay, manual) and Shopify plan billing behind one interface.
Maintainers
Readme
@haatlabs-core/billing
Payment gateways (Stripe, Razorpay, a manual provider) and the plan Shopify bills a store
for. It throws PAYMENT_PROVIDER_ERROR; a project spreads BILLING_ERRORS into
defineErrors. shopifySubscriptionName and reconcileShopifyPlan take the app's name;
the cancel port is optional, and without it a refused plan cancels nothing.
StoreBillingSync (since 0.5.0) keeps an organization's plan what Shopify charges one of
its stores for; the worker runs it when Shopify says a subscription changed. It is given the
app's repositories and the Shopify calls from @haatlabs-core/shopify.
@haatlabs-core/billing/contracts: the schemas an app's API and pages share: checkout,
Shopify checkout and plan, PLAN_LIMIT_ERRORS, and billingSchemas({ metrics, caps,
planFeatures }) for the usage, plan list and plan seed file in the app's own lists.
Install
pnpm add @haatlabs-core/billingIt leaves one package to your app, so the app holds one copy: zod.
