This guide walks you through connecting PayPal so customers can pay with PayPal (and related PayPal payment methods your account supports). You will work in WordPress and in PayPal’s developer tools. You do not need to be a developer, you only need to create an app, register a webhook, and copy a few values.
Money from sales goes to your PayPal Business account. Avenia Digital Products does not take a cut.
Recommended order: set up sandbox → test a purchase → only then add live credentials.
Before you start
You need:
- An active WordPress site with Avenia Digital Products installed
- An SSL certificate (https://)
- A PayPal Business account (https://www.paypal.com)
Personal PayPal accounts are not enough for the REST API credentials this plugin uses. Upgrade to Business if you have not already.
Keep Simulate payments on in the plugin while you set things up. That way you can practice products, emails, and downloads without contacting PayPal. When you are ready to test PayPal itself, turn Simulate payments off and choose Test mode (sandbox).
If you run the plugin on more than one site (for example your store and a demo), create a separate PayPal app per site so each site has its own Client ID, Secret, and webhook.
Step 1: Open the PayPal developer dashboard
- Go to https://developer.paypal.com/dashboard and log in with your PayPal Business account.
- Open Dashboard → Apps & Credentials (wording can vary slightly).
- You will see Sandbox and Live tabs.
Stay on Sandbox for Steps 2–6. Live comes later in Step 7.

Step 2: Creat a sandbox app and paste credentials
- On the Sandbox tab, create an app (for example, name it after your site: “My WordPress Store”).
- Open the app and copy:
- Client ID
- Secret (you may need to click to reveal or generate it)
- In WordPress, go to Avenia Digital Products → Settings → Payment.
- Check Enable PayPal.
- Under PayPal Test credentials, paste the Client ID and Secret.
- Click Save Settings.
Do not paste live values into the Test fields. Sandbox and Live are separate apps and credential sets.



Step 3: Register the sandbox webhook
A webhook is how PayPal tells your site about payments and subscription changes. One-time orders can often complete when the customer returns to your site after checkout. Subscriptions need webhooks for renewals, cancellations, and failed payments, so register one if you sell recurring products.
- In WordPress, open Avenia Digital Products → System Status.
- Copy the PayPal Webhook URL. It looks like: https://yoursite.com/wp-json/avenia-digital-products/v1/paypal-webhook Use your real domain, not “yoursite.com”.
- In the PayPal developer dashboard, open the same sandbox app from Step 2.
- Find Webhooks and add a webhook (or “Add webhook”).
- Paste the URL from System Status as the webhook listener URL.
- Subscribe to these events (names in PayPal’s UI can vary slightly; pick the matching ones):
- PAYMENT.SALE.COMPLETED
- PAYMENT.CAPTURE.COMPLETED
- PAYMENT.SALE.DENIED
- BILLING.SUBSCRIPTION.ACTIVATED
- BILLING.SUBSCRIPTION.CANCELLED
- BILLING.SUBSCRIPTION.SUSPENDED
- BILLING.SUBSCRIPTION.EXPIRED
- Selecting “all events” also works; the plugin ignores events it does not use.
- Save the webhook.
- Copy the Webhook ID PayPal shows for that webhook.
- Back in WordPress, Settings → Payment → PayPal Test credentials, paste it into Webhook ID.
- Save Settings.

If you register a webhook in PayPal but leave Webhook ID empty in the plugin, PayPal events cannot be verified and will be ignored. Leave Webhook ID empty only if you have not registered a webhook at all.
Step 4: Turn on test mode in the plugin
Settings → Payment has two separate controls:
Simulate payments
When checked, checkout finishes on your site without contacting PayPal. Use that while building products and emails.
Real payments use (shown when simulate is off)
Test mode (sandbox) uses your Test credentials. No real money is charged.
Live mode uses your Live credentials. Real money is charged.
For the rest of this sandbox walkthrough:
- Uncheck Simulate payments.
- Set Real payments use to Test mode (sandbox).
- Confirm Enable PayPal is still checked.
- Save Settings.
You should still be on Test credentials only. Leave Live blank until Step 7.
Step 5: Find a sandbox buyer account
In sandbox checkout you cannot log in with your real PayPal email and password. You must use a sandbox personal (buyer) account.
- In the PayPal developer dashboard, open Sandbox → Accounts (sometimes under Testing Tools → Sandbox accounts).
- You should see at least one Business account and one Personal account. The Personal account is the buyer.
- Open the Personal account (or create one if none exists).
- View or reset the sandbox email and password for that account.
- Keep those credentials handy for the next step.
When PayPal’s checkout page appears during a test purchase, log in with that sandbox buyer email and password, not your everyday PayPal login.


Step 6: Try a sandbox payment and verify
Test both product types if you sell them. One-time and subscription checkouts use different PayPal APIs.
Prepare
- Create a paid product if you do not have one yet (see Creating Products).
- Confirm Settings → Payment still has Simulate off and Test mode (sandbox) selected.
- Confirm Test Client ID, Secret, and Webhook ID are saved.
- Open System Status and confirm PayPal shows configured for test credentials.
One-time product
- Add the one-time product to the cart and go to checkout.
- Choose PayPal and complete purchase.
- On PayPal’s page, log in with the sandbox buyer account from Step 5.
- Approve the payment and wait to be returned to your site.
- You should land on the thank-you / order completed page (not an error URL).
Subscription product
- Add one subscription product to the cart (do not mix with one-time items; do not add a second subscription if you will pay with PayPal).
- Choose PayPal and complete purchase.
- Log in with the sandbox buyer account and agree / subscribe.
- Return to your site’s thank-you page.
- The order should show Completed, Access Active (or equivalent), and a PayPal transaction / subscription ID that usually starts with I- (for example I-XXXXXXXXXXXX).
Verify in WordPress
- Open Avenia Digital Products → Orders.
- Confirm the order status is Completed.
- Confirm Payment method is PayPal and a transaction ID is stored.
- Open the order details and confirm line items, totals, and (if used) license keys look correct.
- If the product delivers a file, confirm the customer can download it from the thank-you page or My Account.
- Confirm order / download / license emails were sent (or check your mail logs if email is not configured yet).
- For subscriptions, open Avenia Digital Products → Subscriptions (or the customer’s My Account → Subscriptions) and confirm the subscription is active and linked to the PayPal ID.
Optional PayPal-side checks (sandbox)
- As the sandbox buyer: log in at https://www.sandbox.paypal.com and confirm the payment or automatic payment / subscription appears.
- As the sandbox business account: in the developer dashboard or sandbox PayPal business view, confirm the subscription or sale appears.
If the order stays pending, or you return to a URL like ?aveniadp_payment_error=…, check:
- Simulate is off and Real payments use is Test mode (sandbox)
- Test Client ID / Secret / Webhook ID are filled in
- Webhook URL on System Status matches the webhook in the sandbox app
- You logged in with a sandbox buyer account (not your real PayPal login)
Step 7: Go Live (real payments)
Only after sandbox checkout works, set up live credentials the same way:
- In the PayPal developer dashboard, switch to the Live tab.
- Create a live app (or use an existing live app for this store).
- Copy the live Client ID and Secret into WordPress → Settings → Payment → PayPal Live credentials.
- Register a live webhook using the same PayPal Webhook URL from System Status.
- Subscribe to the same events listed in Step 3.
- Copy the live Webhook ID into the Live Webhook ID field.
- Save Settings.
- Set Real payments use to Live mode (keep Simulate payments off).
- Save Settings again.
- Complete a small real purchase yourself and verify the order the same way as in Step 6.
Sandbox and live each need their own app, webhook, and Webhook ID.
Important limitations
- Mixed carts (one-time + subscription): not allowed with PayPal or Stripe.
- Multiple subscription products: PayPal checkout in this plugin supports one at a time (one billing subscription per approval). Stripe can take several in one cart. If both gateways are enabled, both still show at checkout.
Subscriptions with PayPal
Recurring billing for subscription products is handled by PayPal’s billing subscriptions. Renewals, suspensions, and cancellations are applied on your site through webhooks. If the webhook URL or Webhook ID is missing or wrong, initial checkout may still succeed when the customer returns to your site, but later renewals may not update access correctly.
Customers can cancel from My Account, which cancels at PayPal. If you only revoke access in WordPress, PayPal may keep charging until the subscription is cancelled in PayPal as well. See Subscriptions and Access Control.
Going live checklist
- Sandbox purchase worked (Step 6)
- PayPal Business account is ready for live payments
- Live Client ID and Secret saved
- Live webhook registered with the URL from System Status
- Live Webhook ID pasted into the Live field
- Simulate payments is turned OFF
- Real payments use is set to Live mode
- You completed a small real purchase yourself (one-time and/or subscription)
- Order, email, download, and (if applicable) license / subscription all worked