Billing
Check your subscription status and manage billing through Stripe-powered checkout and portal sessions.
Get Billing Status
Section titled “Get Billing Status”Endpoint: billing-get-status
curl -X POST https://api.driftwoodapp.com/api/billing-get-status \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'Response:
{ "ok": true, "result": { "status": "active", "trial_ends_at": "2025-07-01T00:00:00Z", "current_tier": "pro" }}Create Checkout Session
Section titled “Create Checkout Session”Start a new subscription or upgrade your plan. Returns a Stripe Checkout URL.
Endpoint: billing-create-checkout-session
| Field | Type | Required | Description |
|---|---|---|---|
tier | string | Yes | Plan tier to subscribe to |
curl -X POST https://api.driftwoodapp.com/api/billing-create-checkout-session \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"tier": "pro"}'Response:
{ "ok": true, "result": { "url": "https://checkout.stripe.com/c/pay/..." }}Redirect the user to the returned URL to complete payment.
Create Portal Session
Section titled “Create Portal Session”Open the Stripe Customer Portal to manage subscription, payment methods, and invoices.
Endpoint: billing-create-portal-session
curl -X POST https://api.driftwoodapp.com/api/billing-create-portal-session \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'Response:
{ "ok": true, "result": { "url": "https://billing.stripe.com/p/session/..." }}