> ## Documentation Index
> Fetch the complete documentation index at: https://docs.regentra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe Integration

> Connect Stripe for PSA client invoicing and payment collection. Separate from Regentra platform billing.

Regentra uses Stripe in two distinct ways: platform billing for your Regentra subscription, and per-org billing for invoicing your MSP clients through the PSA module.

## Two modes of Stripe

<Tabs>
  <Tab title="Platform billing">
    Handles your Regentra subscription charges — plan fees, per-seat PSA billing, and compliance tenant add-ons. This is managed automatically when you subscribe and requires no additional setup. See [Billing & Subscriptions](/msp/billing) for details.
  </Tab>

  <Tab title="Per-org billing (PSA invoicing)">
    Lets you invoice your clients for billable time and services through Regentra. You connect your own Stripe account so payments from your clients flow directly to you.
  </Tab>
</Tabs>

## Setting up per-org Stripe

<Steps>
  <Step title="Get your Stripe API keys">
    In the [Stripe Dashboard](https://dashboard.stripe.com), navigate to **Developers → API Keys** and copy your **Publishable key** and **Secret key**.
  </Step>

  <Step title="Enter keys in Regentra">
    Go to **Settings → Integrations → Stripe** and paste both keys.
  </Step>

  <Step title="Test the connection">
    Click **Test Connection** to verify Regentra can communicate with your Stripe account.
  </Step>

  <Step title="Save">
    Save the configuration. You can now generate invoices that accept payment through Stripe.
  </Step>
</Steps>

<Warning>
  Use your **live** API keys for production invoicing. Test keys will not process real payments. Never share your secret key — it is encrypted at rest using AES-256-GCM.
</Warning>

## Invoice generation and payment

Once Stripe is connected, the invoicing flow works as follows:

1. Technicians log billable time against tickets
2. Time entries go through the [approval workflow](/psa/time-tracking)
3. An admin generates an invoice from approved entries
4. The invoice is sent to the client with a Stripe-hosted payment link
5. The client pays online via credit card or ACH

Payment status is tracked on the invoice in Regentra:

| Status      | Meaning                                     |
| ----------- | ------------------------------------------- |
| **Draft**   | Invoice created but not yet sent            |
| **Sent**    | Invoice delivered to the client             |
| **Paid**    | Payment received through Stripe             |
| **Overdue** | Payment deadline has passed without payment |

## Webhook configuration

Regentra uses Stripe webhooks to receive real-time invoice events. Regentra generates a per-org webhook URL with a random token in the path (so two orgs never share a route), but you have to **paste that URL into Stripe yourself** — Stripe does not let third parties create endpoints in your account on your behalf.

<Steps>
  <Step title="Copy the webhook URL from Regentra">
    On the Stripe card, copy the **Webhook URL** value. It looks like `https://app.regentra.io/api/webhooks/stripe/{token}` with a long random token unique to your org.
  </Step>

  <Step title="Add the endpoint in Stripe">
    In the Stripe Dashboard → **Developers → Webhooks → Add endpoint**, paste the URL.
  </Step>

  <Step title="Subscribe to the events">
    The critical event is `invoice.paid` — that's the one that flips a Regentra invoice to PAID and triggers the QuickBooks payment bridge if QB is connected. You can also subscribe to `invoice.payment_succeeded` and `invoice.payment_failed` for the audit log, but only `invoice.paid` drives state transitions.
  </Step>

  <Step title="Paste the Signing Secret back into Regentra">
    Stripe shows the endpoint's **Signing Secret** (starts with `whsec_`). Paste it into the Webhook Signing Secret field on the Regentra card and Save. The signature is verified on every webhook call — a missing or wrong secret causes inbound events to be rejected.
  </Step>
</Steps>

In hourly reconciliation, Regentra also calls `invoices.retrieve` for any PSA invoice flagged as SENT to catch the case where Stripe delivered `invoice.paid` while Regentra was briefly unreachable. This makes the integration self-healing — a missed webhook does not strand the invoice.

## Auto-sync of Stripe products to the Service Catalog

When you connect Stripe for the first time, Regentra automatically pulls every Stripe **Product** and **Price** from your account into the PSA [Service Catalog](/psa/service-catalog). New items appear in the catalog within seconds of the connect-success page — no separate "Sync from Stripe" click is required for the initial pull.

After the initial connect, you can re-trigger the sync any time from **PSA → Catalog**, clicking **Sync from Stripe** at the top of the page, to pick up products you've added on the Stripe side.

## Fee reconciliation with QuickBooks

If you also use QuickBooks Online for books of record, Regentra can post the Stripe processing fee as a QB Purchase natively — no third-party tool required. See [QuickBooks Integration → Stripe processing fee reconciliation](/integrations/quickbooks#stripe-processing-fee--bank-deposit-reconciliation) for the mapping setup.
