> For the complete documentation index, see [llms.txt](https://docs.shipwithdjango.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shipwithdjango.com/payments-and-billing/stripe.md).

# Stripe

ShipWithDjango integrates seamlessly with Stripe, allowing you to manage payments and subscriptions efficiently. The configuration for Stripe is managed through environment variables, ensuring that sensitive information like API keys and webhook secrets remain secure.

All the necessary configuration settings for Stripe are retrieved from your environment variables, which you can set up as described in the Setting up your environment variables section.

### Configuration Details

Here's an overview of the Stripe configuration settings:

* **Stripe Mode**:
  * `STRIPE_LIVE_MODE` controls whether your application is running in live mode (`True`) or test mode (`False`). This setting determines which API keys and webhook secrets will be used.
* **API Keys**:
  * `STRIPE_LIVE_PUBLIC_KEY` and `STRIPE_LIVE_SECRET_KEY` are used for live transactions.
  * `STRIPE_TEST_PUBLIC_KEY` and `STRIPE_TEST_SECRET_KEY` are used for test transactions in Stripe's sandbox environment.
* **Webhook Secrets**:
  * `STRIPE_LIVE_WEBHOOK_SECRET` is used to verify the authenticity of live webhook events.
  * `STRIPE_TEST_WEBHOOK_SECRET` is used to verify test webhook events.

By correctly configuring these settings, you can confidently handle payments and subscriptions in your application, whether you are in development or live production mode.
