Skip to content

How do I connect Stripe, PayPal or Polar?

Stripe, PayPal and Polar are included with KahunaCart. Each is its own plugin, and all three connect the same way.

Provider Plugin Modes
Stripe kahunacart-stripe test / live
PayPal kahunacart-paypal sandbox / live
Polar kahunacart-polar sandbox / production

Connect a provider

  1. Install the provider's plugin from Plugins in the admin, or with bin/gpm install kahunacart-stripe (or kahunacart-paypal, kahunacart-polar).
  2. Open KahunaCart → Setup → Payments and press Settings on the provider's card.
  3. Paste the API key for the mode you are using, and save. For Stripe that is the secret key (sk_test_… or sk_live_…) from Developers → API keys.
  4. Press Set up webhook on the card. It registers https://your-site.com/shop/webhook/{provider} with the provider and saves the signing secret or webhook ID that comes back.
  5. Press Check connection. It goes green once the key works and the webhook is registered with every event it needs. If it says Needs attention, the reason is written under the card's name, and pressing Set up webhook again fixes it.

The provider now appears at checkout. Test and live are separate: do steps 3 to 5 once for each mode.

Important

Set up webhook needs your site to be reachable from the internet. A local development site is not, so use the provider's own forwarding tool there, such as stripe listen.

Test before you take real money

Keep the provider in its test or sandbox mode and place an order on your storefront.

For Stripe, pay with the test card 4242 4242 4242 4242, any future expiry date and any CVC. On a local site, forward webhooks with the Stripe CLI:

BASH
stripe listen --forward-to https://your-site.test/shop/webhook/stripe

stripe listen prints its own whsec_… secret. Paste it into the test webhook field while you forward, and press Set up webhook again when you are done to get the real one back.

More detail

Was this helpful?

More in Payments

See all in Payments