Environment Configuration
You can configure the Stripe Checkout Fieldtype environment from your .env
file.
Remember to be a good developer and ensure you are not committing your Stripe keys to your repository.
Key and Secret
Your Stripe key and secret, provided by Stripe's control panel.
Required.
1STRIPE_KEY=your-stripe-key2STRIPE_SECRET=your-stripe-secret
Webhook Secret
The webhook secret provided by Stripe when configuring your Stripe account for your site.
Required only if you want to use the webhook support.
1STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret
Webhook Tolerance
Stripe allows a tolerance of variance between the header's timestamp and the current time. You can adjust this to increase (or decrease) the tolerance to meet your needs.
Default: 300
1STRIPE_WEBHOOK_TOLERANCE=300
CP Currency format
The Fieldtype uses PHP's NumberFormatter to display Price data from Stripe in a currency format. Don't forget to correctly set up your site's locale in your config/statamic/sites.php
file.
Set this to be a three-character ISO currency code supported by your PHP environment.
Default: AUD
1# for Australian Dollars2STRIPE_CHECKOUT_CP_CURRENCY=AUD3 4# for US dollars5STRIPE_CHECKOUT_CP_CURRENCY=USD