Web

Setting Up PayPal Payments in WordPress: Forms, One-Time and Recurring Payments

Web · Published 2026-10-27

To accept PayPal in WordPress, pick a plugin that matches what you sell (a store, a donation or order form, or a membership), connect it to a PayPal business account through PayPal's REST app credentials or the plugin's onboarding flow, test everything in PayPal's sandbox, and confirm payments on the server through webhooks before delivering anything. One-time payments and recurring payments use different PayPal APIs, so check that the plugin supports the flow you need before you build the form.

This guide stays general on purpose: plugin interfaces and PayPal's dashboards change often, and fees and availability depend on your country and account. Follow the current documentation of PayPal and of your plugin for the exact screens. No product is recommended here.

Step 1: decide what kind of payment you take

SituationUsual approach
Physical or digital products with a cartAn e-commerce plugin with a PayPal gateway (for WooCommerce, PayPal publishes its own official extension)
A single form: a booking deposit, an order, a registration fee, a donationA form plugin with a PayPal add-on, or a dedicated payment-form plugin
Memberships or paid content with renewalsA membership plugin with PayPal subscription support
Fixed price, very low volumeA PayPal-hosted button or payment link pasted into a page, no plugin at all

A cart and coupons bring their own considerations; for WooCommerce shops, the article on WooCommerce coupons covers that side.

Step 2: evaluate the plugin

Whatever you choose, check these points in its documentation:

Step 3: prepare PayPal and the sandbox

  1. Use a PayPal business account; personal accounts are not meant for receiving payments on a website.
  2. In the PayPal Developer Dashboard, PayPal provides sandbox accounts: a test business account (the seller) and a test personal account (the buyer). Sandbox payments use test money only.
  3. Many plugins offer a "Connect with PayPal" onboarding button that links your account without copying keys. Others ask for the client ID and secret of a REST app created in the developer dashboard; there is one pair for sandbox and another for live.
  4. Store the secret only in the plugin's settings or, better, in wp-config.php constants if the plugin supports them. Never paste it into a page, a form field or a public repository.

Step 4: build the form for one-time payments

A typical order or deposit form collects a name, an email, the item or option chosen and possibly a quantity. The payment field then calculates the total and sends the buyer to PayPal (or opens PayPal's popup). Points that matter:

Step 5: recurring payments

Subscriptions in PayPal's REST API are built from three objects: a product (what you sell), a plan (billing frequency, price, optional trial) and a subscription (one buyer's agreement to a plan). Plugins usually create the product and plan for you when you configure a recurring option in the form. When designing it:

Step 6: confirm payments with webhooks

The buyer's return to your "thank you" page is not proof of payment: the browser can be closed, or the URL visited directly. Deliver goods, accounts or access only when your server has been told by PayPal. With REST integrations, that is a webhook: PayPal sends an HTTPS POST to an endpoint on your site for events such as PAYMENT.CAPTURE.COMPLETED, PAYMENT.CAPTURE.REFUNDED, BILLING.SUBSCRIPTION.ACTIVATED or BILLING.SUBSCRIPTION.CANCELLED.

Thinking of each payment as a record that moves through states (created, approved, completed, refunded) is the same model as in any CRUD application, and makes the logs much easier to read.

Step 7: test, then go live

  1. In sandbox mode, run a successful payment, a cancelled one, a refund and, for subscriptions, an activation and a cancellation. Confirm that each one updates the form entry and sends the right emails.
  2. Switch the plugin to live mode and replace sandbox credentials with live ones; this is the step most often forgotten.
  3. Make one small real payment and refund it to confirm the live webhook works.
  4. Keep caching plugins and security firewalls from blocking the webhook endpoint, and exclude checkout pages from page caching.

Security and maintenance checklist

Summary

Choose a plugin type that fits your use case and confirm that it uses PayPal's current REST APIs and supports recurring payments if you need them. Connect a business account, test every path in the sandbox, compute amounts on the server, confirm payments through verified webhooks rather than return pages, and switch carefully to live credentials. Follow PayPal's and the plugin's current documentation for the exact steps.

Sources

Read next

More in Web