Paystack for WordPress Without WooCommerce
You can accept Paystack payments on WordPress without WooCommerce by using the Paystack Forms plugin (which creates payment forms via shortcodes), embedding Paystack Inline JS directly in a page template, or linking to Paystack Payment Links. The right approach depends on whether you need a simple donation button, a custom payment form, or a lightweight checkout that does not justify a full e-commerce plugin.
Why You Might Skip WooCommerce
WooCommerce is designed for online stores. It adds product catalogs, shopping carts, inventory management, shipping calculations, and order management to WordPress. If you are selling physical or digital products with a proper catalog, WooCommerce is the right tool.
But many WordPress sites do not need any of that. Consider these scenarios:
- A church or NGO website that needs a donation button.
- A freelancer's portfolio site with a "Pay Invoice" page.
- A school website that collects exam fees or registration payments.
- An event page that sells tickets for a single event.
- A membership site where users pay a flat fee to access content.
- A service business (plumber, consultant, designer) that needs to collect deposits.
Installing WooCommerce for any of these is like hiring a moving truck to deliver a letter. It works, but it adds complexity, database tables, admin menus, and performance overhead that you do not need. A lightweight payment solution is a better fit.
This guide is part of the Paystack plugins and no-code integrations cluster.
The Paystack Forms Plugin
The Paystack Forms plugin is the most popular option for accepting payments on WordPress without WooCommerce. It creates payment forms that you embed on any page or post using a shortcode.
Installation. Go to Plugins > Add New in your WordPress admin. Search for "Paystack Forms." Install and activate the plugin by Starter Dev.
Configuration. Go to Paystack Forms in your WordPress admin menu. Enter your Paystack API keys (test keys first, then live keys). Set your currency.
Creating a payment form. Click "Add New" under Paystack Forms. You will see a form builder where you set the payment amount (or allow the customer to enter their own amount), add custom fields (name, phone number, address, or any other data you need), and configure the success message or redirect URL.
The plugin generates a shortcode like [pff-paystack id="123"]. Paste this shortcode on any WordPress page or post, and the payment form appears. When a customer fills in the form and clicks pay, the Paystack checkout popup opens. After payment, the customer sees the success message or gets redirected to a thank-you page.
What the plugin handles for you:
- Transaction initialization with Paystack's API.
- The inline checkout popup.
- Server-side transaction verification after payment.
- Email notifications to you and the customer.
- A record of all payments in your WordPress admin (Paystack Forms > Payments).
The plugin does not handle subscriptions, recurring payments, or complex billing logic. For those, you either need WooCommerce with the Paystack plugin or a custom solution.
Common Use Cases for Paystack Forms
Donation pages. Create a form with a variable amount (the donor enters how much they want to give). Add a custom field for the donor's message. This is the most common use case for the plugin in Kenya and Nigeria. Churches, schools, and NGOs use it heavily.
Event registration. Set a fixed amount for the ticket price. Add custom fields for attendee name, phone number, and any dietary preferences or t-shirt sizes. Each payment creates a registration record you can export from the admin.
Invoice payments. Create a form with a variable amount. Share the page URL with your client. They enter the invoice amount, pay, and you get an email notification. Simple, but it works for freelancers who do not need a full invoicing system.
Course or membership fees. Set the fee amount, add custom fields for student details, and collect payment. The plugin does not automatically grant access to content after payment, so you need to handle that part manually or with a membership plugin that you trigger based on the payment confirmation.
Multiple forms on one site. You can create different forms for different purposes. A school might have one form for exam fees, another for uniform payments, and a third for donations. Each form has its own shortcode and appears on its own page.
Embedding Paystack Inline JS Directly
If you are a developer and want more control than the Paystack Forms plugin offers, you can embed Paystack's Inline JS directly into a WordPress page template. This gives you full control over the form design, the data you collect, and the payment flow.
Here is the approach:
1. Create a custom page template. In your WordPress theme, create a new PHP file (for example, template-payment.php) with the template header:
<?php
/* Template Name: Payment Page */
get_header();
?>
<div id="payment-form">
<h2>Make a Payment</h2>
<form id="paymentForm">
<label for="email">Email</label>
<input type="email" id="email" required />
<label for="amount">Amount (KES)</label>
<input type="number" id="amount" required />
<button type="submit">Pay Now</button>
</form>
</div>
<script src="https://js.paystack.co/v2/inline.js"></script>
<script>
document.getElementById('paymentForm').addEventListener('submit', function(e) {
e.preventDefault();
var email = document.getElementById('email').value;
var amount = document.getElementById('amount').value * 100;
var handler = PaystackPop.setup({
key: '<?php echo esc_js(get_option("paystack_public_key")); ?>',
email: email,
amount: amount,
currency: 'KES',
callback: function(response) {
window.location.href = '/payment-success/?ref=' + response.reference;
},
onClose: function() {
alert('Payment window closed.');
}
});
handler.openIframe();
});
</script>
<?php get_footer(); ?>
2. Create a verification endpoint. You need server-side verification. Create a simple REST API endpoint in your theme's functions.php or a custom plugin that receives the transaction reference and verifies it with Paystack's API using your secret key.
3. Assign the template to a page. Create a new page in WordPress and select "Payment Page" as the template.
This approach is more work than the Forms plugin, but it lets you design the form exactly as you want, validate inputs with your own logic, and control the entire post-payment flow.
The Simplest Approach: Paystack Payment Links
If you want the absolute minimum effort, skip plugins and custom code entirely. Create a Payment Link in the Paystack Dashboard and add it as a button on your WordPress site.
Step 1: Log in to the Paystack Dashboard. Go to Payment Links or Payment Pages. Create a new link with the amount (or leave it open for the customer to enter), a description, and any custom fields you need.
Step 2: Copy the generated URL.
Step 3: In your WordPress editor, add a button block. Set the button text to "Pay Now" or "Donate" and paste the Paystack URL as the link. The button can go on any page, in a sidebar widget, or in your site's menu.
When a visitor clicks the button, they land on Paystack's hosted payment page. They complete the payment and can optionally be redirected back to a thank-you page on your site (configure the redirect URL in the Paystack Dashboard when creating the link).
This approach requires zero technical knowledge. No plugins to install, no code to write, no server-side verification to worry about (Paystack handles all of that on their hosted page). The downside is that the customer leaves your site to pay, and the payment page looks like a Paystack page, not your brand. For many small organizations, that tradeoff is fine.
For a full walkthrough of Payment Links, see Paystack Payment Links without writing code.
Security and Verification
Whether you use the Paystack Forms plugin, custom Inline JS, or Payment Links, the security principles are the same.
Always verify server-side. The Paystack Forms plugin does this automatically. If you build a custom implementation, you must verify every transaction by calling Paystack's Verify Transaction API with the transaction reference. Never rely solely on the JavaScript callback to confirm payment.
Use HTTPS. Your WordPress site must have an SSL certificate. Paystack will not load on HTTP pages. Most WordPress hosts provide free SSL through Let's Encrypt.
Protect your API keys. Store your secret key in WordPress options (accessible via the admin panel) or in your wp-config.php file. Never hardcode it in a page template where it could be visible in the page source. The public key can safely appear in frontend JavaScript. The secret key must never be exposed to the browser.
Set up webhooks. In the Paystack Dashboard, configure your webhook URL. For the Paystack Forms plugin, the webhook URL is typically your site's root URL with a specific parameter. Check the plugin's documentation for the exact format. Webhooks ensure that payments are confirmed even when the customer closes their browser before the redirect completes.
Keep WordPress and plugins updated. Security vulnerabilities in WordPress plugins are discovered regularly. Update everything, especially plugins that handle financial transactions.
Choosing the Right Approach
Here is how to decide which option fits your situation:
You are a non-technical site owner who needs to collect payments occasionally. Use Paystack Payment Links. Add a button on your site that links to the payment page. Done.
You want a payment form on your site without writing code. Use the Paystack Forms plugin. Install it, enter your API keys, create a form, and paste the shortcode on your page.
You are a developer who wants a custom payment experience. Embed Paystack Inline JS in a custom page template. Build your own form, handle verification server-side, and style everything to match your brand.
You are selling products with a catalog, cart, and inventory. That is what WooCommerce is for. See Paystack for WooCommerce instead.
Many WordPress sites combine approaches. A membership site might use the Paystack Forms plugin for annual dues, a Payment Link for event registrations, and custom Inline JS for a specialized checkout flow on one particular page. The approaches are not mutually exclusive.
Key Takeaways
- ✓WooCommerce is optional. The Paystack Forms plugin lets you create payment forms on any WordPress page using shortcodes, without installing WooCommerce.
- ✓Paystack Forms supports fixed-amount payments, customer-entered amounts (donations), and custom fields for collecting additional information.
- ✓For developers comfortable with PHP, embedding Paystack Inline JS directly into a WordPress page template gives you full control over the payment experience.
- ✓The simplest option is linking to a Paystack Payment Link from a WordPress button or menu item. Zero code, zero plugins.
- ✓Always verify transactions server-side, even on a simple WordPress site. The Paystack Forms plugin handles this automatically. Custom implementations need their own verification endpoint.
- ✓Webhook configuration is still important for payment forms. Set the webhook URL in your Paystack Dashboard so transactions are confirmed even if the customer closes their browser.
Frequently Asked Questions
- Can I use the Paystack Forms plugin and WooCommerce on the same WordPress site?
- Yes. They are separate plugins that do not conflict with each other. You might use WooCommerce for your product store and Paystack Forms for a separate donation page. Each plugin manages its own payment flows independently.
- Does the Paystack Forms plugin support recurring payments?
- The standard Paystack Forms plugin handles one-time payments. For recurring payments without WooCommerce, you would need to use Paystack Payment Links with a subscription plan, build a custom solution using the Paystack Subscriptions API, or use a WordPress membership plugin that supports Paystack.
- Can I export payment records from the Paystack Forms plugin?
- Yes. The plugin stores all payment records in your WordPress database. You can view them in the WordPress admin under Paystack Forms > Payments. Many versions of the plugin include a CSV export option. You can also view the same transactions in your Paystack Dashboard.
- Is the Paystack Forms plugin compatible with all WordPress themes?
- The plugin uses a shortcode that outputs a standard HTML form, so it works with most themes. Styling may vary. If the form does not look right with your theme, you can add custom CSS to adjust the appearance. The payment popup itself is rendered by Paystack and is not affected by your theme.
Ready to build real-world apps?
Join the McTaba Labs full-stack marathon (4 months full-time · 6 months part-time). Learn M-Pesa, USSD, and WhatsApp engineering while shipping 8 production apps.
Apply to the McTaba Marathon