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

# Payment providers

> Connect a payment provider to collect payments from your customers.

Connect a payment provider so Lago can request payment for your customers’ invoices. Link each customer to the provider connection you want to use.

## Native integrations

> [card] [Stripe](https://getlago.com/docs/v2/integrations/payments/stripe/payments.md)
>
> Collect payments through Stripe.

> [card] [Adyen](https://getlago.com/docs/v2/integrations/payments/adyen-integration.md)
>
> Collect payments through Adyen.

> [card] [GoCardless](https://getlago.com/docs/v2/integrations/payments/gocardless-integration.md)
>
> Direct debit bank payments.

> [card] [Cashfree](https://getlago.com/docs/v2/integrations/payments/cashfree-integration.md)
>
> Cashfree integration. Community-maintained.

> [card] [Moneyhash](https://getlago.com/docs/v2/integrations/payments/moneyhash-integration.md)
>
> MoneyHash integration. Community-maintained.

If you collect payments outside Lago, [record manual payments](https://getlago.com/docs/v2/guide/payments/record-manual-payments.md) against the invoices.

## Connect a customer to a provider

Choose the provider connection configured in your organization, then link the customer to their account with that provider.

> [tab] Dashboard
>
> 1. Open **Customers**.
> 2. Select the customer.
> 3. Click **Edit**.
> 4. In **Payment provider**, select the provider connection.
> 5. Enter the provider customer ID, or let Lago create the customer in the provider.
> 6. Save.

> [tab] API
>
> | Field | Meaning |
> | - | - |
> | `payment_provider` | Provider type, for example `stripe`. |
> | `payment_provider_code` | Code of the provider connection in your organization. |
> | `provider_customer_id` | Customer identifier in the provider, for example `cus_example`. |
> | `provider_payment_methods` | Payment methods allowed by the provider. |
> | `sync_with_provider` | Whether to create or synchronize the customer with the provider. |
> | `sync` | Whether to run provider synchronization before returning the response instead of in a background job. |
>
> ```bash Connect a customer to Stripe theme={"dark"}
> LAGO_URL="https://api.getlago.com"
> API_KEY="__YOUR_API_KEY__"
>
> curl --location --request PUT "$LAGO_URL/api/v2/customers/customer_example" \
>   --header "Authorization: Bearer $API_KEY" \
>   --header 'Content-Type: application/json' \
>   --data-raw '{
>     "customer": {
>       "payment_provider": "stripe",
>       "payment_provider_code": "stripe_main",
>       "sync_with_provider": true
>     }
>   }'
> ```

## Collect a payment

Choose the action you need:

* [Add a payment method](https://getlago.com/docs/v2/guide/payments/payment-methods.md).
* [Retry an invoice payment](https://getlago.com/docs/v2/guide/payments/payment-retries.md).
* [Share a payment link](https://getlago.com/docs/v2/guide/payments/payment-retries.md#create-a-payment-url).
* [Create a payment request](https://getlago.com/docs/v2/guide/payments/payment-requests.md) for overdue invoices.
* [Issue a credit note](https://getlago.com/docs/v2/guide/invoicing/credit-notes/overview.md) to request a refund.

Provider payments appear in [`GET /payments`](https://getlago.com/docs/v2/api-reference/payments/list) with `payment_type: "provider"`, `payment_provider_code` and `provider_payment_id`. When the provider needs the customer to act, for example to authenticate, `next_action` holds the provider instructions.

## Next steps

> [card] [Payment methods](https://getlago.com/docs/v2/guide/payments/payment-methods.md)
>
> Store, list and choose the default method.

> [card] [Payment retries](https://getlago.com/docs/v2/guide/payments/payment-retries.md)
>
> Retry collection or share a payment URL.

> [card] [Update a customer (API)](https://getlago.com/docs/v2/api-reference/customers/update.md)
>
> Provider fields on the customer.

> [card] [List payments (API)](https://getlago.com/docs/v2/api-reference/payments/list.md)
>
> Payment fields and filters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.