# Payment Gateway Configuration {#payment-gateway-configuration}


Configure payment processing for invoices.


## Supported Gateways {#supported-gateways}


| Gateway | Type          | Status   |
| ------- | ------------- | -------- |
| Stripe  | Credit Card   | Built-in |
| PayPal  | Online        | Built-in |
| Manual  | Bank Transfer | Built-in |


## Stripe Setup {#stripe-setup}


1. Create a [Stripe account](https://stripe.com)
2. Get API keys from Stripe Dashboard
3. Configure in Gauzy:

```env
STRIPE_SECRET_KEY=sk_live_xxxxx
STRIPE_PUBLISHABLE_KEY=pk_live_xxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxx
```

4. Go to **Settings** → **Payment** → **Stripe**
5. Enter API keys
6. Enable Stripe as payment method


## PayPal Setup {#paypal-setup}


```env
PAYPAL_CLIENT_ID=your-client-id
PAYPAL_CLIENT_SECRET=your-client-secret
PAYPAL_MODE=live  # or sandbox
```


## Payment Flow {#payment-flow}






```mermaid
sequenceDiagram
    Client->>API: Create Payment Intent
    API->>Stripe: Create PaymentIntent
    Stripe-->>API: Client Secret
    API-->>Client: Payment form data
    Client->>Stripe: Submit payment
    Stripe-->>API: Webhook (payment_intent.succeeded)
    API->>DB: Update invoice status = PAID
    API->>Client: Payment confirmation
```






## Manual/Bank Transfer {#manualbank-transfer}


1. Add bank details in **Settings** → **Payment**
2. Include bank info on invoices
3. Manually mark invoices as paid when transfer received


## Related Pages {#related-pages}


- [Invoice Management](https://sourcey-gauzy.pages.dev/api/invoice-endpoints/index.md) — invoicing
- [Invoice Endpoints](https://sourcey-gauzy.pages.dev/api/invoice-endpoints/index.md) — invoice API
- [Accounting Overview](https://sourcey-gauzy.pages.dev/features/accounting-overview/index.md) — financial features
