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

# Stripe Integration

> Connect Stripe to enable invoice payments, subscription billing, and automated receipts.

## Overview

The Stripe integration powers all payment collection in Nextoria Hub. When connected, clients can pay invoices directly from the Client Portal via Stripe Checkout — without needing a Stripe account of their own.

## Prerequisites

* A [Stripe](https://stripe.com) account (free to create)
* Your business has completed Stripe's identity verification
* Admin access on your Nextoria Hub workspace

## Setup

<Steps>
  <Step title="Get your Stripe API keys">
    In the Stripe Dashboard, go to **Developers → API Keys**. Copy your
    **Publishable key** and **Secret key**.

    <Warning>
      Use **Test mode** keys during development. Switch to **Live mode** keys
      only when you're ready to accept real payments.
    </Warning>
  </Step>

  <Step title="Connect in Nextoria Hub">
    In Nextoria Hub, go to **Settings → Integrations → Stripe** and click
    **Connect**. Enter your Publishable Key and Secret Key, then click **Save**.
  </Step>

  <Step title="Configure your payment settings">
    Under **Settings → Finance**, configure: - Default currency - Available
    payment methods (card, ACH, SEPA, etc.) - Automatic payment receipts
    (On/Off) - Failed payment retry schedule
  </Step>

  <Step title="Set up your Stripe webhook">
    In the Stripe Dashboard, go to **Developers → Webhooks → Add Endpoint**.
    Add: `https://yourdomain.nextoriahub.com/api/webhooks/stripe` Select
    the following events: - `payment_intent.succeeded` -
    `payment_intent.payment_failed` - `invoice.paid` -
    `customer.subscription.deleted` Copy the **Webhook Signing Secret** and add
    it to **Settings → Integrations → Stripe → Webhook Secret**.
  </Step>
</Steps>

## How Invoice Payments Work

When a client clicks **Pay Now** on an invoice:

1. Nextoria Hub creates a Stripe Checkout Session server-side
2. The client is redirected to Stripe's hosted payment page
3. The client completes payment
4. Stripe sends a `payment_intent.succeeded` webhook to Nextoria Hub
5. The invoice status updates to `Paid` automatically
6. Both the agency admin and client receive a confirmation email

## Supported Payment Methods

| Method                   | Region      | Notes                                 |
| ------------------------ | ----------- | ------------------------------------- |
| Visa / Mastercard / Amex | Global      | Always enabled                        |
| Debit cards              | Global      | Always enabled                        |
| ACH Direct Debit         | US only     | Requires Stripe business verification |
| SEPA Direct Debit        | EU only     | Requires SEPA mandate                 |
| iDEAL                    | Netherlands | Instant bank transfer                 |
| Sofort                   | EU          | Bank redirect                         |
| Apple Pay / Google Pay   | Global      | Auto-enabled when card is enabled     |

Enable or disable methods in **Stripe Dashboard → Settings → Payment Methods**.

## Recurring Payments (Autopay)

For retainer clients, you can offer **Autopay** — the client stores their payment method and invoices are charged automatically on the due date.

Enable it per client under **Clients → \[Client Name] → Billing → Enable Autopay**.

## Test Mode

To test invoice payments without real money:

1. Use Stripe test keys in **Settings → Integrations → Stripe**
2. Use Stripe test card numbers in Checkout:
   * **Success**: `4242 4242 4242 4242` (any future expiry, any CVC)
   * **Decline**: `4000 0000 0000 0002`
   * **Requires auth**: `4000 0025 0000 3155`

<Info>
  Switch to live keys before going live. Test and live keys are separate and do
  not share data.
</Info>
