All docs
Payments
Updated 2026-04-28
5 min read

Stripe setup

Connect Stripe with your publishable key, secret key, and webhook secret.

Stripe lets your customers pay with credit or debit cards from almost anywhere in the world. This guide walks you through getting Stripe connected to your Gannako store. Take your time — you only do this once.

What you'll need

  • A Stripe account (free to create).
  • About 15 minutes.
  • Your business details (Stripe will ask for them during signup).

Step 1 — Create your Stripe account

  1. Go to dashboard.stripe.com/register and sign up.
  2. Verify your email when Stripe sends you a confirmation link.
  3. Stripe will ask for business details (name, address, bank account) before you can take real payments. You can come back to this — your test keys work right away.

Step 2 — Copy your API keys

API keys are like passwords that let your store talk to Stripe. There are two — a Publishable key (safe to show in your website code) and a Secret key (must be kept private).

  1. In your Stripe dashboard, click Developers in the left sidebar, then API keys.
  2. Make sure the toggle at the top right says Test mode while you're setting up. Switch to Live mode once you've tested everything.
  3. Copy the Publishable key — it starts with pk_test_... (or pk_live_... in live mode).
  4. Click Reveal live key next to the Secret key, then copy it. It starts with sk_test_... or sk_live_....

Step 3 — Set up the webhook

A webhook is how Stripe tells your store when a payment goes through, fails, or gets refunded. Without it, your orders won't update automatically.

  1. In Stripe, go to Developers → Webhooks.
  2. Click Add endpoint.
  3. Paste this URL into Endpoint URL:

Webhook URL

https://gannako.com/api/webhooks/stripe
  1. Under Events to send, click Select events and tick:
    • checkout.session.completed
    • payment_intent.succeeded
    • payment_intent.payment_failed
    • charge.refunded
  2. Click Add endpoint.
  3. On the next page, click Reveal next to Signing secret and copy it. Starts with whsec_....

Step 4 — Paste keys into Gannako

  1. In your Gannako admin, open Settings → Payments → Stripe.
  2. Click the API Credentials tab.
  3. Paste your Publishable key, Secret key, and Webhook signing secret into the matching fields.
  4. Click Save. A green check appears once Stripe confirms the keys.
  5. Toggle the method Enabled on the main payments page.

Step 5 — Test before you go live

Stripe gives you fake card numbers that work in test mode without real money moving.

Test card (succeeds)

4242 4242 4242 4242

Test card (declines)

4000 0000 0000 9995

Use any future expiry date, any 3-digit CVC, any postal code.

Step 6 — Switch to live

  1. In Stripe, flip the Test mode toggle off.
  2. Copy the live versions of all three keys (they're different from test).
  3. Paste them into Gannako, replacing the test keys.
  4. Run one real order — even Rs. 100 — to confirm everything works end to end.