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 keysk_live_... (or sk_test_... for test mode)
  • Publishable keypk_live_... (or pk_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.succeeded
  • payment_intent.payment_failed
  • payment_method.attached

After saving, Stripe shows you the Signing secret (whsec_...). Copy it — you need it in the next step.

Step 2: Enter keys in the AuthGate dashboard

  1. Navigate to your project in the AuthGate dashboard
  2. Click the Billing tab
  3. Under Stripe Configuration, enter:
    • Stripe secret key
    • Stripe publishable key
    • Webhook signing secret
  4. 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

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:

  1. The secret key is copied correctly (no trailing spaces)
  2. The key matches the environment — test keys (sk_test_...) won't work for live payments and vice versa
  3. Your Stripe account is active and not restricted

Once connected, you can proceed to create plans and prices.

Was this page helpful?