Connect ERPNext to Stripe
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 until you verify the complete payment flow.
- Search for Stripe Settings in ERPNext.
- Click Add Stripe Settings.
- 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 |

- 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
- Open the Payment Gateway Account created for this Stripe configuration.
- Select the company and the bank or clearing account that should receive Stripe payments.
- Configure the default Payment Request email template if your workflow sends payment links by email.
- Save the record.
Verify the connection
Saving Stripe Settings creates the ERPNext records but does not make a test request to Stripe.
- Confirm that the new Stripe Payment Gateway appears in a Payment Request.
- Complete Set up webhooks.
- Make a test payment to verify the API keys and end-to-end connection.
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.
Last updated 3 weeks ago
Was this helpful?