# Common Workflows

### Adding a New User to a Tenant

{% stepper %}
{% step %}
Admin invites user: `POST /invite`
{% endstep %}

{% step %}
User receives email with invitation link
{% endstep %}

{% step %}
User clicks link: `GET /invitations/{token}/accept`
{% endstep %}

{% step %}
If new user: Set password via `POST /invitations/{token}/set-password`
{% endstep %}

{% step %}
User is added to tenant with specified role
{% endstep %}
{% endstepper %}

### Setting Up Billing

{% stepper %}
{% step %}
Create tenant: `POST /tenants`
{% endstep %}

{% step %}
Add payment method:

* Get setup intent: `POST /payments/setup-intent`
* Collect card with Stripe.js on frontend
* Attach payment method: `POST /payments/payment-methods`
  {% endstep %}

{% step %}
Create subscription: `POST /payments/subscription`
{% endstep %}

{% step %}
Subscription status updated via webhooks
{% endstep %}
{% endstepper %}

### Changing Subscription Plans

{% stepper %}
{% step %}
Get available plans: `GET /payments/plans`
{% endstep %}

{% step %}
Update subscription: \`PATCH /payments/subscription\` {%{% step %}

Stripe prorates the charges automatically
{% endstep %}

{% step %}
Webhook updates subscription status
{% endstep %}
{% endstepper %}

## Additional Resources

* **FastAPI Documentation:** <https://fastapi.tiangolo.com>
* **SQlAlchemy Documentation:** <https://www.sqlalchemy.org/>
* **Stripe API Reference:** <https://stripe.com/docs/api>
* **React Documentation:** <https://react.dev>
* **Tailwind CSS:** <https://tailwindcss.com>

## Support

For questions or issues, contact: <admin@fast-saas.com>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fast-saas.com/common-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
