Stripe Payment Integration
To enable Stripe payments and automated membership or credit updates, you must configure webhooks in your Stripe Dashboard.
1. Webhook Setup and Supported Events
How to Add the Webhook
-
Go to the Stripe Dashboard.
-
Navigate to Developers > Webhooks.
-
Click Add endpoint and enter your webhook URL:
https://YOURPAGEURL/wp-json/stripe/webhook
Replace
YOURPAGEURL
with your actual domain (e.g.,https://example.com
). -
Select the following events:
Event Name | Purpose |
---|---|
customer.subscription.created | Membership |
customer.subscription.deleted | Membership |
customer.subscription.updated | Membership |
invoice.payment_succeeded | Membership/Credits |
Make sure you enable all the above event types for proper integration.
2. Stripe API Keys
To connect your website to Stripe, you need the following keys from your Stripe Dashboard:
- Stripe Publishable Key: Used on the frontend to securely identify your Stripe account.
- Stripe Secret Key: Used on the backend to perform secure operations such as creating charges and managing subscriptions.
- Webhook Secret Key: Used to verify that incoming webhook requests are genuinely from Stripe.
You can find these keys in your Stripe Dashboard under Developers > API keys and Developers > Webhooks.
Add these keys to:
wp-admin > king > lists > payment options > stripe
Tip
Always test using a Stripe test account before going live.