PayPal billing.
Connect PayPal so businesses can subscribe and manage their plans.
On this page
Use PayPal to collect subscription payments from businesses. Partners approve payment on PayPal and manage their subscription from My plan in Reward Loyalty.
Before you start
You need a PayPal business account and a public HTTPS address for your Reward Loyalty installation.
Start in Sandbox, PayPal's test environment. Use credentials, plans, and a webhook from that same environment throughout setup.
Step 1: Create a REST app and copy the credentials
- Sign in to the PayPal Developer Dashboard.
- Select Sandbox.
- Under Apps & Credentials, create or open a REST app.
- Copy its Client ID and Secret.
Keep the secret private. You will add the webhook ID in step 4.
Step 2: Create one plan per paid tier and copy the plan IDs
Each paid Reward Loyalty plan needs a PayPal monthly subscription plan. Add a yearly PayPal plan if you offer annual billing.
- Sign in to your PayPal sandbox business account.
- Open Subscription plans and select Create Plan.
- Follow PayPal's steps to set the product, price, currency, and billing cycle.
- Activate the plan.
- Copy its plan ID, which starts with
P-. - Repeat for each paid plan and billing interval you offer.
The free plan needs no PayPal plan. PayPal's subscription guide also covers plan creation through its API.
Step 3: Add the credentials and plan IDs
- In Reward Loyalty, open Plans & billing → Billing settings → Provider credentials.
- Enter the PayPal client ID and secret.
- Select sandbox mode.
- Save the credentials.
PayPal plan IDs belong in the Plans editor beside each plan's displayed price.
Finish the webhook setup below first. Then select PayPal as the billing provider in step 5 to show the PayPal plan fields.
Step 4: Create the webhook and copy the webhook ID
A webhook sends subscription changes from PayPal to Reward Loyalty.
- Copy the PayPal webhook URL from Provider credentials.
- In the PayPal Developer Dashboard, open the same sandbox app.
- Under Webhooks, select Add Webhook.
- Enter the URL you copied.
- Select the events listed below.
- Save the webhook.
- Copy its webhook ID.
- Enter the ID in Reward Loyalty's PayPal webhook field.
- Save the credentials.
Select these events:
BILLING.SUBSCRIPTION.ACTIVATED
BILLING.SUBSCRIPTION.UPDATED
BILLING.SUBSCRIPTION.CANCELLED
BILLING.SUBSCRIPTION.SUSPENDED
BILLING.SUBSCRIPTION.EXPIRED
PAYMENT.SALE.COMPLETED
The URL ends with /api/paypal/webhook. Use the webhook ID from the same app as your credentials. See PayPal's webhook guide for provider details.
Step 5: Confirm
- Select Test connection for PayPal on Provider credentials.
- Return to Billing settings.
- Select PayPal and confirm the switch.
- Open Set up plans and select a paid plan.
- Enter its displayed price, currency, and monthly PayPal plan ID.
- If you offer annual billing, enable it and enter its yearly price and PayPal plan ID.
- Save the plan.
- Repeat for each paid plan.
- Open Health center and check that Billing Provider shows PayPal in sandbox mode.
The amount and currency in Reward Loyalty must match the PayPal plan. PayPal 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 PayPal sandbox buyer account.
- Check that the selected plan appears with an active status.
- Check PayPal's webhook deliveries for a successful response.
Before accepting payments, create matching live credentials, plans, and a webhook. Save their values in Reward Loyalty and select live mode. Sandbox values do not work in live mode.
What partners see on My Plan
Eligible partners use Upgrade to start PayPal approval. Subscribers can cancel or change plans from My plan.
In Reward Loyalty, a plan change cancels the current PayPal subscription before starting a replacement. The partner must approve the replacement on PayPal. If they leave before approval, they have no active subscription and must subscribe again.
Cancellation restricts access when PayPal reports the subscription as cancelled. Admin-created partners without an existing PayPal subscription contact you for plan changes.
Subscription states
| PayPal status | Effect in Reward Loyalty |
|---|---|
ACTIVE |
Plan access is available. |
APPROVAL_PENDING, APPROVED |
Access is restricted until activation finishes. |
SUSPENDED |
Access is restricted. |
CANCELLED, EXPIRED |
Access is restricted; the plan name remains. |
A business with no linked subscription keeps its assigned access under Legacy status. Unknown subscription states restrict access. See Billing states.
Troubleshooting
| Problem | What to check |
|---|---|
| PayPal cannot be selected | Save the client ID, secret, and webhook ID. |
Webhook returns 403 |
Check that the webhook ID belongs to the app sending the event. |
| Payment succeeds but the plan stays unchanged | Check webhook delivery and the PayPal plan ID saved for that plan. Start subscriptions from Reward Loyalty. |
| Credentials fail after going live | Use live credentials, live plan IDs, a live webhook, and live mode together. |
| A plan change cancels the old subscription | This is the app's plan-change process. The partner must approve the replacement subscription. |
Quick reference
Optional server setup. Use .env if you manage billing settings on the server. Saved admin values take precedence.
BILLING_PROVIDER=paypal
PAYPAL_CLIENT_ID=...
PAYPAL_SECRET=...
PAYPAL_MODE=sandbox
PAYPAL_WEBHOOK_ID=...
PAYPAL_PLAN_TIER2_MONTHLY=P-...
PAYPAL_PLAN_TIER2_YEARLY=P-...
Repeat the plan ID 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.