Start a Stripe Checkout session to subscribe your organization to a Safeclose plan, or open the Customer Portal to update payment details and manage invoices.
Safeclose uses Stripe to handle subscription billing for your organization. From the Safeclose UI — or directly through the API — you can start a Stripe Checkout session to select a plan, and open the Stripe Customer Portal to manage payment methods, view invoices, or cancel your subscription. When Stripe processes a payment or subscription change, Safeclose receives a webhook and updates your organization’s billing status automatically.
You must have the billing permission in your organization to start checkout sessions or open the Customer Portal. Organization owners always have this permission. See Organizations and billing for how to grant billing access to other members.
POST /api/billing/checkout-session creates a Stripe Checkout session for the specified plan and returns a redirect URL. Send the user to that URL to complete payment.
Redirect the user to the returned url. After a successful payment, Stripe sends a webhook to Safeclose, which links your organization to the Stripe customer and activates the selected plan. The user is then redirected back to your billing page.
If the user cancels the checkout, they are redirected back to your billing page with no changes to your subscription.
POST /api/billing/portal opens the Stripe Customer Portal where your organization can update payment methods, download invoices, or cancel the subscription.
After a successful checkout or subscription change, Stripe sends a webhook event to Safeclose. Safeclose processes the following events automatically:
Stripe event
What changes in Safeclose
checkout.session.completed
Your organization is linked to a Stripe customer and the selected plan tier is applied.
customer.subscription.updated
Subscription status and current period end date are refreshed.
customer.subscription.deleted
Your subscription is marked as canceled and your plan reverts to Free.
invoice.paid
Subscription status is confirmed as active.
invoice.payment_failed
Your billing account is flagged as past due.
You do not need to take any action for these updates — Safeclose handles them in the background.
To see your current subscription status and billing history, go to Organizations → your org → Billing in Safeclose, or open the Customer Portal using the steps above.