---
title: "Connect ERPNext to Stripe"
space: "Integrations"
url: "https://integrations.frappe.cloud/integrations/payment-integration/stripe/connect"
updated: "2026-09-08"
---

Create a Stripe Settings record in ERPNext using the API keys from your Stripe account.

## Create Stripe Settings

Sign in to ERPNext as a System Manager and use the test keys from [Get your Stripe API keys](./api-keys) until you verify the complete payment flow.

1. Search for **Stripe Settings** in ERPNext.
2. Click **Add Stripe Settings**.
3. Complete the required fields.


| Field                | What to enter                                                           |
| -------------------- | ----------------------------------------------------------------------- |
| Payment Gateway Name | A short name for this Stripe configuration, such as `Primary` or `Test` |
| Publishable Key      | The matching `pk_test_...` or `pk_live_...` key                         |
| Secret Key           | The matching `sk_test_...` or `sk_live_...` key                         |
| Checkout Mode        | Leave as **Hosted Checkout**                                            |
| Redirect URL         | Optional destination after ERPNext records a successful payment         |


![](/files/api secret highlight_edited.webp)

4. Click **Save**.

After saving, ERPNext creates a Payment Gateway named `Stripe-{Payment Gateway Name}` and the related Payment Gateway Account.

## Configure the Payment Gateway Account

1. Open the Payment Gateway Account created for this Stripe configuration.
2. Select the company and the bank or clearing account that should receive Stripe payments.
3. Configure the default Payment Request email template if your workflow sends payment links by email.
4. Save the record.

## Verify the connection

Saving Stripe Settings creates the ERPNext records but does not make a test request to Stripe.

1. Confirm that the new Stripe Payment Gateway appears in a Payment Request.
2. Complete [Set up webhooks](./webhooks).
3. Make a test payment to verify the API keys and end-to-end connection.

![](/files/Stripe_Setup.mp4)

*Creating Stripe Settings in ERPNext*

## Expected result

ERPNext has a Stripe Settings record, Payment Gateway, and Payment Gateway Account connected to the same Stripe account.

## Troubleshooting

- If the Payment Gateway or Payment Gateway Account is missing, reopen Stripe Settings, confirm all required fields, and save again as a System Manager.
- If checkout reports an authentication error, confirm that the publishable and secret keys belong to the same Stripe account and mode.
- If the gateway is unavailable on a Payment Request, confirm that its Payment Gateway Account is configured for the correct company.