Skip to main content
Geneva, Switzerland Call our support
English

Stripe and commerce settings

Keys, webhooks, tax modes, shipping zones, and coupons.

Stripe keys

  • Use test keys in staging (sk_test_…, pk_test_…)
  • Store live keys only in production .env or encrypted admin settings
  • Never commit keys to git

Configure under Admin → Commerce → Commerce settings:

  • Stripe secret key
  • Stripe publishable key
  • Webhook signing secret

Webhooks

  1. In Stripe Dashboard → Developers → Webhooks, add endpoint:
https://your-site.com/commerce/stripe/webhook

Subscribe to:

  • checkout.session.completed — Marks order paid, triggers fulfillment
  • checkout.session.expired — Cancels abandoned checkout orders

Webhooks fulfill inventory, digital grants, and emails if the customer never returns to the success URL.

Tax modes

ModeBehaviour
FlatSingle commerce_tax_rate_bps on subtotal after coupon
Per countryRate from Tax rates admin for cart ship-to country
Stripe Taxautomatic_tax on Checkout Session (enable Stripe Tax in Dashboard)

Shipping zones

  1. Create zones under Admin → Shipping with ISO country codes (comma-separated).
  2. Leave countries empty on one zone for rest-of-world fallback.
  3. Enable Use shipping zones in Commerce settings.

Flat-rate fields remain fallback when zones are disabled. When shipping is enabled, Checkout collects shipping address for allowed countries.

Coupons

Manage under Commerce → Coupons. Coupons apply to cart lines using local price_cents pricing. Products using stripe_price_id only charge via Stripe's price—coupons are disabled when such items are in the cart.

Emails and inventory

  • Enable customer confirmation and admin notification emails in settings
  • Enable inventory tracking to decrement stock_qty on paid orders
  • Low-stock report available in admin when tracking is on

Troubleshooting

  • Webhook 400 — Signing secret mismatch; verify endpoint URL is exact.
  • Order stuck pending — Webhook not received; check Stripe event log and server firewall.
  • Tax wrong at checkout — Confirm ship-to country selected on cart matches tax rate table.