newOS for Developers
Back to Skill Portal
Paywall & Credits
Subscription management, Stripe integration, and credit operations
š Related newOS Documentation
Subscription Status Fields
Available on UserReadPrivateResponse (current user only)
// Private user subscription fields
{
isPro: boolean; // Has active Pro subscription
proLevel: number; // Pro tier level (1, 2, 3)
subscriptionLevel: string; // "free" | "pro" | "enterprise"
subscriptionStatus: string; // "active" | "canceled" | "past_due"
subscriptionExpiry: string; // ISO date string
stripeUid: string; // Stripe customer ID
watts: number; // Engagement credits balance
}
// Check subscription status:
// See /actions/user#current for implementationAvailable Skills
intermediate
Create payment intent for one-time purchases
POST /payment/stripe/intentintermediate
Set up recurring billing for Pro access
POST /payment/stripe/subscription/paymentSubscription Payment Flow
Full implementation in payment.ts ā subscribe()
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā Stripe.js ā āāā¶ ā Payment Method ā āāā¶ ā POST /payment/ ā
ā Card Element ā ā (tokenized) ā ā stripe/sub... ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāā¬āāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāā¼āāāāāāāāā
ā UI Update ā āāā ā user.current() ā āāā ā Webhook ā
ā isPro: true ā ā refresh ā ā subscription ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā