The Paystack Payment Gateway extension lets your directory accept payments through Paystack for one-time listing fees, featured upgrades, and Pricing Plans purchases, including recurring card subscriptions. Buyers pay on a Paystack-hosted checkout and return to your directory afterward. This guide walks through getting your API key, activating the gateway, registering the webhook, and testing before you go live.
Prerequisites #
- Directorist Latest version with the extension activated alongside it. PHP 7.4+ with the OpenSSL extension is required.
- Monetization turned on, since the gateway only appears at checkout when monetization is active.
- A Paystack account (sandbox/test and live).
- A public HTTPS address. Webhooks cannot reach
localhostor other non-public sites. - A currency supported by Paystack. This is required. Set your directory currency to currently supported currencies of PayStack (and confirm it is enabled on your Paystack account) under Directorist Settings → Monetization Settings → Currency Settings. If the currency is not supported, checkout cannot complete and no payment will go through.
- Something to charge for. Paystack works with any Directorist order. Without Pricing Plans you can still accept payments for:
- Featured listings from Directorist core (Monetization Settings → Monetize with Featured Listings, with its fee and duration).
- Claim Listing fees, if you use the Claim Listing extension and charge for claims.
- Directorist Pricing Plans (optional). Needed only for paid plans, subscriptions and free trials.
Path: WP Admin → Directorist → Settings → Monetization Settings
- Set Enable Monetization Feature to Yes.
- Save your changes.

Step 1 – Install and Activate the Extension #
- Go to WP Admin → Plugins → Add New → Upload Plugin and upload the complete extension ZIP.
- Click Install Now, then Activate.
Or, you can download and activated it from your Directorist Dashboard > Themes & Extensions
If you see a notice about the required Directorist version, update Directorist.
Step 2 – Get Your Paystack Secret Key #
- Log in to the Paystack Dashboard.
- Open the API keys settings and copy your Test Secret Key (starts with
sk_test_). - Repeat for your Live Secret Key (starts with
sk_live_) when you are ready to accept real payments.
The extension needs only the secret key. It checks the key prefix, so a test key saved in Live mode (or the reverse) is rejected.

Step 3 – Activate Paystack in Gateway Settings #
Path: WP Admin → Directorist → Directorist Settings → Monetization Settings → Gateway Settings
- Open the Gateway Settings tab.
- Under Active Gateways, check Paystack.
- (Optional) To pre-select Paystack at checkout, choose it from the Default Gateway dropdown.
- Click Save.
The extension does not enable itself as a checkout method. You must do this step.

[SCREENSHOT: Gateway Settings tab showing Active Gateways and Default Gateway]
Step 4 – Configure the Paystack Gateway Tab #
Path: WP Admin → Directorist → Directorist Settings → Monetization Settings → Paystack Gateway
- Enable Sandbox Mode is on by default. While it is on, Directorist uses your Sandbox (test) key and no real payments are processed. Turn it off only when you are ready to go live.
- Set Gateway Title (shown to buyers at checkout; defaults to Paystack).
- Set Gateway Description (defaults to “Pay securely with Paystack using an available payment method.”).
- Enter your key. The field shown depends on the mode:
- Sandbox Secret Key while Sandbox Mode is on.
- Live Secret Key while Sandbox Mode is off.
- Click Save.

[SCREENSHOT: Paystack Gateway tab showing Enable Sandbox Mode, Gateway Title, Gateway Description and Secret Key fields]
Step 5 – Verify the Connection #
- After saving, click Verify Connection next to the key.
- A success message confirms Paystack accepted the saved key.
Notes:
- Verify after saving. If the key is empty or has unsaved changes, you’ll be asked to add or save it first.
- Changing a key clears its earlier verification result.
- Verification only checks the saved key. It does not create a payment and does not confirm webhooks work.
- Failed checks show separate messages for authentication errors, blocked requests, and network failures.

[SCREENSHOT: Verify Connection button with a success message]
Step 6 – Register the Webhook #
The webhook is how Paystack tells your directory that a payment or subscription event happened. Without it, orders and subscriptions won’t update reliably.
- On the Paystack Gateway tab, find Webhook URL and click Copy webhook URL. The URL looks like
https://your-site.com/wp-json/directorist-paystack/webhook. - In the Paystack Dashboard, open the API/webhook settings for the same environment (Test or Live) and paste the URL as the webhook URL.
- Repeat for the other environment when you go live.
Below the URL, the settings screen reports the last verified event received for Sandbox and Live separately. “No verified event received.” means Paystack has not yet delivered a signed event to your site.
The extension verifies every webhook’s signature with your secret key and ignores forged requests. Accepted events are queued first and processed in the background through WP-Cron.


[SCREENSHOT: Webhook URL field with the last verified event status]
Step 7 – Run a Sandbox Test Checkout #
Always test before going live.
- Keep Enable Sandbox Mode on and the Sandbox key saved.
- Add a paid listing or featured upgrade as a test user and choose Paystack at checkout.
- Complete the payment on the Paystack page with a Paystack test card.
- Confirm you land back on your directory and the order shows as paid.
- Return to the Paystack Gateway tab and check that the sandbox webhook status shows a verified event.




[SCREENSHOT: Checkout page showing Paystack as a payment option]
Going Live #
- Save your Live Secret Key and click Verify Connection (in Live mode).
- Register the webhook URL in the Live environment of your Paystack Dashboard.
- Turn Enable Sandbox Mode off and save.
- Make a small real purchase to confirm the full flow.
Sandbox and live keys, verification results, and records are kept separate.
Managing Orders #
Every purchase through Paystack creates an order in Directorist. After the buyer pays, they return to your directory and the order updates to paid once Paystack confirms the transaction. Directorist calculates taxes and discounts, and Paystack charges the final amount. For the full walkthrough of reviewing and managing orders, see the Managing Orders guide.
Recurring Plan/Package Payments #
Recurring payments work through Paystack native subscriptions, and require Directorist Pricing Plans with a subscription plan.
Supported billing intervals: daily, weekly, monthly, quarterly, every six months, and annually. Other interval/count combinations are rejected. Recurring enrollment uses cards.
How it works:
- The buyer selects Paystack and checks out. The first payment is collected on Paystack’s checkout.
- After the payment is verified, the extension creates a Paystack subscription that starts at the end of the paid period. Paystack then charges the card automatically each cycle.
- Each paid cycle renews the package. Failed charges do not extend paid access.
Free trials
- Trials are available only to customers who have no active package and haven’t used a trial in that directory.
- If the buyer has a reusable saved card, the first automatic charge is scheduled for the end of the trial, and a successful charge converts the trial to the paid package.
- If no saved card is available, buyers can start the trial without payment (a Start free trial without automatic billing option appears). Access ends at expiry and they must pay manually to continue.
Cancelling
- Cancel at period end stops future billing and keeps access until the paid period ends.
- Immediate cancellation stops future billing and ends access now.
- Neither action issues a refund.
Reliable Background Processing #
Webhook events and renewal checks run through WP-Cron. On low-traffic sites, set up a real server cron job so WP-Cron runs reliably. An hourly recovery job re-checks pending orders, subscription setup, and renewals. To run it manually:
wp cron event run directorist_paystack_recover
Limitations #
- Automatic refunds are not supported. Refund in the Paystack Dashboard.
- Direct Debit subscriptions, custom recurring schedules, split settlements, and migrating subscriptions from another gateway are not supported.
- Deactivating the extension does not cancel subscriptions at Paystack. Cancel active subscriptions before deactivating or removing the gateway.
- Saved-card enrollment depends on your WordPress authentication salts. If you rotate them, saved card details can no longer be read, and some customers may need to check out again. Existing subscriptions stay active at Paystack.
Troubleshooting #
| Problem | What to check |
|---|---|
| Payment fails or can’t complete | Your directory currency is not gateway supported or is not enabled on your Paystack account |
| Paystack doesn’t appear at checkout | Monetization is on; Paystack is checked under Active Gateways; currency is supported; the plan isn’t one the gateway hides for subscriptions |
| “This key does not match the selected Sandbox/Live mode” | Use an sk_test_ key in Sandbox Mode and an sk_live_ key in Live mode |
| “Add and save your secret key before verifying” | Enter the key and click Save first |
| Order stays pending after payment | Webhook not registered for this environment, site not publicly reachable over HTTPS, or WP-Cron not running |
| “No verified event received” | Re-copy the webhook URL into the matching Paystack environment and send a test event |
| “Below Paystack’s minimum for this currency” | Raise the price to at least the minimum shown above |
| Dependency or version notice in admin | Install the complete release ZIP and update Directorist to 8.8.0 or later |
FAQs #
Does the buyer enter card details on my site? #
No. Payment happens on a Paystack-hosted checkout.
Can I use it without Pricing Plans? #
Yes, for one-time payments such as core featured listings and Claim Listing fees. Subscriptions and trials need Pricing Plans.
Does it work with WooCommerce checkout? #
No. WooCommerce orders use WooCommerce’s own gateways. This extension handles Directorist’s native checkout only. You can use Directorsit WooCommerce Pricing Plan for better integration with Directorist.
Do I need a publishable key? #
No. Only the secret key is used.
Which payment methods do buyers see? #
One-time checkout offers the methods enabled on your Paystack account. Recurring enrollment uses cards.