Introducing Magic Payments 1.0.2
One entitlement contract over two billing rails.
Multi-rail billing for apps on the Magic framework: a web rail and a store in-app-purchase rail on iOS and Android, read through the same Payments facade.
One contract. Two rails.
Your app asks Payments what the user is entitled to, and the web rail or the store rail does the billing behind it. Each platform gets the rails it supports.
-
Five entitlement reads
Learn more about Five entitlement readscurrentEntitlement,getPlans,getUsage,getInvoicesandgetPaymentMethodwork on every platform that has a driver, e.g.Payments.currentEntitlement(). -
Web rail
Learn more about Web railPayments.webcovers checkout, swap plan, cancel and a customer portal through hosted pages your backend opens. The contract isWebBillingService. -
Store rail
Learn more about Store railPayments.storeruns iOS and Android purchases through RevenueCat: identify, purchase, products, restore and the store's subscription management. -
Rails are checked
Learn more about Rails are checkedPayments.webandPayments.storeare nullable, so the app asks which rail it has before it shows a button. -
Where to manage
Learn more about Where to managemanageViaandmanageUrlonBillingEntitlementsay whether the user manages the plan on the web or in the store. -
A dowel CLI
Learn more about A dowel CLIpayments:install,payments:configureandpayments:doctor, plus one read-only MCP tool,payments_doctor, for AI tools.
Add it in seconds
Or add to pubspec.yaml:
dependencies:
magic_payments: ^1.0.2
Or give your AI agent this prompt: