Payments

Setting Up Stripe

Connecting Stripe to Influenzic: separate test/live key fields, mode toggle, webhook setup, and test card numbers.

Stripe is the recommended primary payment gateway for Influenzic. It supports card payments from 195+ countries with real-time confirmation via webhooks. Influenzic stores separate keys for Stripe’s test and live environments and a mode toggle so you can switch without re-entering keys.

Step 1: Get Your API Keys

  1. 1
    Log in to your Stripe Dashboard at dashboard.stripe.com.
  2. 2
    Navigate to Developers → API Keys.
  3. 3
    Note the toggle at the top of the Stripe Dashboard. While in Test mode, copy the test secret key (sk_test_…) and the test publishable key (pk_test_…). Switch to Live mode and copy the corresponding live keys (sk_live_…, pk_live_…).
Keep your secret keys private. Never commit them to version control or share them publicly. Anyone with a secret key can initiate charges on your Stripe account.

Step 2: Configure in Influenzic

Navigate to Influenzic → Settings → Payment & Wallet and find the Stripe fields:

Setting Key Value
inzc_stripe_mode test or live — controls which key pair is used for all Stripe API calls
inzc_stripe_test_publishable_key Your pk_test_… key
inzc_stripe_test_secret_key Your sk_test_… key
inzc_stripe_test_webhook_secret The whsec_… signing secret from your test webhook endpoint
inzc_stripe_live_publishable_key Your pk_live_… key
inzc_stripe_live_secret_key Your sk_live_… key
inzc_stripe_live_webhook_secret The whsec_… signing secret from your live webhook endpoint

Save your settings after entering the keys. To go live, change inzc_stripe_mode to live — no other changes are needed if you have already entered your live keys.

Step 3: Create the Webhook Endpoint

Webhooks are essential — they confirm payment success even when the user closes their browser before returning to the site.

  1. 1
    In the Stripe Dashboard, go to Developers → Webhooks → Add endpoint. Create a separate endpoint for test mode and live mode — Stripe Dashboard has a mode toggle at the top.
  2. 2
    Set the Endpoint URL to:
    https://yourdomain.com/wp-json/influenzic/v1/webhook/stripe
  3. 3
    Select the events to listen for: checkout.session.completed, payment_intent.succeeded, payment_intent.payment_failed.
  4. 4
    After saving, click Reveal next to Signing secret and copy the whsec_… value.
  5. 5
    Paste the signing secret into the appropriate inzc_stripe_test_webhook_secret or inzc_stripe_live_webhook_secret field in Influenzic settings and save.
Each environment needs its own webhook endpoint. The signing secrets are different for test and live — do not mix them. Influenzic reads the correct secret based on the current inzc_stripe_mode setting.

Test Mode

While inzc_stripe_mode is set to test, Influenzic uses your test keys and test webhook secret. No real money is charged. Use Stripe’s test card numbers:

  • 4242 4242 4242 4242 — payment succeeds
  • 4000 0000 0000 9995 — payment declined (insufficient funds)
  • 4000 0000 0000 3220 — requires 3D Secure authentication
  • Any future expiry date; any 3-digit CVV
Local development: Stripe cannot reach localhost to deliver webhooks. Use the Stripe CLI (stripe listen --forward-to localhost/wp-json/influenzic/v1/webhook/stripe) to forward test webhooks to your local machine during development.

Was this article helpful?