Payments
Collect recurring revenue from your users with hosted checkout, automatic plan sync, and webhook handling. You define the plans — we manage the billing infrastructure.
plan claim is set in their JWT, and they're redirected to your app. No code changes needed.What's available now
Plan selection works today without payment processing — perfect for freemium models, trials, and beta launches. Users choose a tier, the claim is set, and your app gates features accordingly.
Hosted page after login, auto-sets the plan claim
Plan tier embedded in every access token
Set plans programmatically from your backend
Coming soon: hosted checkout
Full payment processing is in development. When it ships, upgrading a user will be a single redirect — no payment code in your app.
Redirect users to a branded checkout page. No payment processing code in your app.
When a user pays, their plan claim updates automatically.
We process payment webhooks — upgrades, downgrades, cancellations, failed payments.
Self-serve portal for users to manage subscriptions, update payment methods, view invoices.
Preview: checkout redirect
When the payment module launches, upgrading a user will look like this:
// Redirect user to hosted checkout
const checkoutUrl = "https://astapa.com/checkout";
const params = new URLSearchParams({
project_id: "your_project_id",
plan: "pro",
user_id: currentUser.id,
success_url: "https://yourapp.com/welcome",
cancel_url: "https://yourapp.com/pricing",
});
window.location.href = `${checkoutUrl}?${params}`;Preview: automatic plan sync
After checkout, we handle the payment webhook and update the user's claims. Your app just reads the token — no webhook code needed.
// After payment, the user's token automatically includes the new plan
const user = verifyToken(access_token);
console.log(user.claims.plan);
// "pro" ← updated automatically after checkout
console.log(user.claims.billing_cycle);
// "monthly" ← set by the payment moduleGet started today
Set up auth and plans now. When the payment module ships, it plugs right in.