Stripe billing.
Connect Stripe so businesses can subscribe and manage their billing.
On this page
Use Stripe to collect subscription payments from businesses. Partners subscribe through Stripe Checkout and manage payment methods and invoices in Stripe's billing portal.
Before you start
You need a Stripe account and a public HTTPS address for your Reward Loyalty installation.
Start in a Stripe test environment. Keep its keys, prices, and webhook separate from live values.
Step 1: Get your API keys
- Open API keys in Stripe.
- Select your test environment.
- Copy the publishable key and secret key.
Keep the secret key private. You will add the webhook signing secret in step 4.
Step 2: Create a product and its prices
- Open Stripe's Product catalog.
- Add a product for each paid plan, using your chosen plan name.
- Add a recurring monthly price with the correct amount and currency.
- If you offer annual billing, add a recurring yearly price.
- Copy each price ID, which starts with
price_.
The free plan needs no Stripe price. Use a price ID for the connection; a product ID starts with prod_ and does not work here. See Stripe's price guide for the provider controls.
Step 3: Add the keys and price IDs
- In Reward Loyalty, open Plans & billing → Billing settings → Provider credentials.
- Enter the publishable key and secret key in the Stripe fields.
- Save the credentials.
Price IDs belong in the Plans editor beside each plan's displayed price.
Finish the webhook setup below first. Then select Stripe as the billing provider in step 5 to show the Stripe price fields.
Step 4: Create the webhook
A webhook sends subscription changes from Stripe to Reward Loyalty.
- Copy the Stripe webhook URL from Provider credentials.
- In Stripe Workbench, open Webhooks and create an event destination for your account.
- Select the events listed below.
- Choose Webhook endpoint as the destination type.
- Enter the URL you copied.
- Create the destination.
- Copy its signing secret, which starts with
whsec_. - Enter it in Reward Loyalty's Stripe webhook secret field.
- Save the credentials.
Select these events:
customer.subscription.created
customer.subscription.updated
customer.subscription.deleted
customer.updated
customer.deleted
The URL ends with /api/stripe/webhook. Stripe needs the public HTTPS URL from your installation. See Stripe's webhook guide for its current dashboard steps.
Step 5: Confirm
- Select Test connection for Stripe on Provider credentials.
- Return to Billing settings.
- Select Stripe and confirm the switch.
- Open Set up plans and select a paid plan.
- Enter its displayed price, currency, and monthly Stripe price ID.
- If you offer annual billing, enable it and enter its yearly price and Stripe price ID.
- Save the plan.
- Repeat for each paid plan.
- Open Health center and check Billing Provider.
The amount and currency in Reward Loyalty must match the Stripe price. Stripe controls the amount charged.
Test before you go live
- Register a test business through your installation's business registration page.
- From My plan, subscribe with a Stripe test card.
- Check that the selected plan appears with an active status.
- Check Stripe's webhook deliveries for a successful response.
- Open Manage billing to check the portal.
Before accepting payments, replace the test keys, prices, and webhook secret with matching live values. Configure the live Stripe billing portal for the plan changes you want to offer. See Stripe's portal setup.
What partners see on My Plan
Eligible partners use Upgrade to start checkout and Change plan to open the Stripe portal. Manage billing opens payment methods and invoices.
Partners who registered themselves can use these controls. Admin-created partners without a linked Stripe customer contact you for plan changes.
Subscription states
Active and trialing subscriptions allow plan access. Past-due, incomplete, cancelled, unpaid, and paused subscriptions restrict access.
A business without a Stripe customer or subscription keeps its assigned access under Legacy status. See Billing states for the shared status descriptions.
Troubleshooting
| Problem | What to check |
|---|---|
| Stripe cannot be selected | Save both API keys and the webhook signing secret. |
Webhook returns 403 |
Check the signing secret and its test or live environment. |
| Checkout reports an unknown price | Use a price_ ID from the same environment as the keys. |
| Payment succeeds but the plan stays unchanged | Check webhook delivery and the price ID saved for that plan. |
| No upgrade button | Check whether the account qualifies for self-service billing. |
Quick reference
Optional server setup. Use .env if you manage billing settings on the server. Saved admin values take precedence.
BILLING_PROVIDER=stripe
STRIPE_KEY=pk_test_...
STRIPE_SECRET=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PRICE_TIER2_MONTHLY=price_...
STRIPE_PRICE_TIER2_YEARLY=price_...
Repeat the price settings for TIER3 and TIER4. Yearly IDs are needed for plans that offer annual billing. The free plan needs no ID. If you cache configuration, rebuild the cache after changing these values.