Base44 SDK Adds a Payments Module for One-Time Payments and Subscriptions
Base44's SDK now includes a payments module that lets apps accept one-time payments and subscriptions through Stripe, PayPal, or Base44 Payments. Frontend methods render embedded checkouts and look up the current user's purchases. Service-role methods, called from backend functions, create checkouts, list any buyer's purchases, refund payments, and manage subscriptions.
Key Takeaways
- The SDK's new payments module covers both one-time payments and subscriptions from a single API.
- It works with three providers: Stripe, PayPal, and Base44 Payments.
- Frontend methods render embedded checkouts directly in the app.
- The current user's purchases can be looked up from the client, so apps can show purchase history without custom plumbing.
- Creating checkouts, listing any buyer's purchases, refunding, and managing subscriptions are service-role methods called from backend functions.
- Keeping refunds and subscription changes on the service role keeps sensitive money operations server-side.
Selling inside an app, from code
Base44's SDK now includes a payments module. Apps can use it to accept one-time payments and subscriptions through Stripe, PayPal, or Base44 Payments. Developers get one SDK surface for charging customers, whichever of the three providers the app uses.
Frontend methods
The client-side methods cover the buyer's side of the flow. They render embedded checkouts inside the app and look up the current user's purchases, so an app can show a buyer what they have bought without a custom backend endpoint.
Service role methods
The privileged operations sit behind the service role and are meant to be called from backend functions. They can:
- Create checkouts.
- List purchases for any buyer.
- Refund payments.
- Manage subscriptions.
Keeping these on the service role means money-moving actions stay on the server and are not exposed to browser code.
Where to find the details
The payments reference in the SDK documentation lists every client and service-role method.