Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Billing

Check your subscription status and manage billing through Stripe-powered checkout and portal sessions.

Endpoint: billing-get-status

Terminal window
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"
}
}

Start a new subscription or upgrade your plan. Returns a Stripe Checkout URL.

Endpoint: billing-create-checkout-session

FieldTypeRequiredDescription
tierstringYesPlan tier to subscribe to
Terminal window
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.

Open the Stripe Customer Portal to manage subscription, payment methods, and invoices.

Endpoint: billing-create-portal-session

Terminal window
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/..."
}
}