Billing Setup
Connect your Stripe account to AuthGate to enable payment processing. AuthGate stores your Stripe keys per-project and uses them to collect payments on your behalf.
Connect Stripe
You need three values from your Stripe dashboard:
- Secret key —
sk_live_...(orsk_test_...for test mode) - Publishable key —
pk_live_...(orpk_test_...for test mode) - Webhook secret — generated after creating a webhook endpoint in Stripe
Step 1: Create a Stripe webhook endpoint
In the Stripe Dashboard, create a new webhook endpoint pointing to:
https://your-authgate-instance.com/api/billing/stripe/webhook
Select the following events to forward:
payment_intent.succeededpayment_intent.payment_failedpayment_method.attached
After saving, Stripe shows you the Signing secret (whsec_...). Copy it — you need it in the next step.
AuthGate subscribes to a minimal set of Stripe events because it manages subscription state internally. You do not need to forward all Stripe events.
Step 2: Enter keys in the AuthGate dashboard
- Navigate to your project in the AuthGate dashboard
- Click the Billing tab
- Under Stripe Configuration, enter:
- Stripe secret key
- Stripe publishable key
- Webhook signing secret
- Click Save
AuthGate encrypts and stores these keys in its database associated with your project. They are never exposed in client-side responses.
Configure currency
Set your billing currency on the same Billing tab. Currency is configured once per project and applies to all plans, prices, and invoices.
Supported currencies: USD, EUR, GBP, CAD, AUD, JPY, CHF, SEK, NOK, DKK
Currency cannot be changed after the first subscription is created. Choose carefully — a mismatch between your Stripe account's default currency and the currency configured in AuthGate will cause payment failures.
Verify the connection
After saving, AuthGate makes a test API call to Stripe to validate your secret key. The dashboard shows a green Connected badge if the key is valid.
If the connection fails, check:
- The secret key is copied correctly (no trailing spaces)
- The key matches the environment — test keys (
sk_test_...) won't work for live payments and vice versa - Your Stripe account is active and not restricted
Once connected, you can proceed to create plans and prices.