Turn On Paystack IP Allowlisting When Your Backend Runs on a Cloud Host

Paystack IP allowlisting only accepts single public IPv4 addresses, up to 10 per environment. If your backend runs on a host whose outbound address changes, route your secret-key calls through two static IPs, add both to the test and live lists, and only then save the change.

Diagram of a cloud-hosted backend sending Paystack API calls through QuotaGuard Shield's two static IPs, with both IPs on Paystack's allowlist for test and live.

Paystack has offered IP allowlisting since March 2023. It is optional: you turn it on from your Paystack Dashboard. Once it is enabled, Paystack checks the source address of every request made with your secret key and blocks any request from an address that is not on your list. That is a good control to have, because a leaked secret key stops working from someone else's machine.

The catch is the form. It wants specific, stable public IPv4 addresses, and many cloud hosts do not give you one. This guide walks through getting a stable pair, registering it on both environments, and checking the path before you rely on it.

When you need this

There are two common reasons to turn the allowlist on:

  • You want to lock down your secret key. Paystack's authentication docs describe IP allowlisting as a way to prevent unauthorized use of your secret keys from unknown IP addresses.
  • You want a higher transfer tier. Paystack's support article on requesting a higher transfer tier lists IP whitelisting as a security requirement, alongside app-based 2FA for all Dashboard users and transfer approvals. Meeting the requirements does not guarantee approval.

If neither applies, you can leave the feature off and your secret-key calls keep working from any address. That is a valid choice. It just means your key is usable from anywhere if it leaks.

What Paystack accepts

From Paystack's authentication docs and its IP whitelisting support article:

  • Up to 10 addresses for each environment. Test and live have separate lists, tied to your test and live secret keys.
  • Valid public IPv4 addresses only. IPv6, IP ranges and private addresses are not accepted. You cannot paste in a cloud provider's published CIDR range.
  • The check applies to requests that authenticate with your secret key. Dashboard logins are not affected, and neither is public-key traffic from Paystack Inline or the mobile SDKs, which runs in your customer's browser or app.
  • Admins, or users with permission to manage API Keys and Webhooks, can edit the list. Paystack emails the integration's main owner when someone changes the live list.

The traffic path

Your backend (Heroku, Render, Railway, Vercel, Lambda, containers)
  -> QuotaGuard Shield outbound HTTPS proxy (two fixed IPv4 addresses)
  -> api.paystack.co
     (sees one of your two addresses and checks it against the list)

This is outbound traffic only. With Shield, the connection from your app to the proxy is itself HTTPS, including the CONNECT request that carries the proxy credentials. The proxy then opens a tunnel and your client negotiates TLS directly with Paystack, so your secret key and request bodies stay inside that TLS session (QuotaGuard Shield setup).

Get a stable pair, then fill in the list

  1. Use QuotaGuard Shield. This is payment traffic carrying your secret key, so we recommend Shield, which encrypts the hop from your app to the proxy as well as the session with Paystack. If the workload is in PCI-DSS scope, Shield is QuotaGuard's supported product for regulated data, as our Flutterwave allowlisting guide explains. A proxy does not make your application compliant on its own. Static and Shield use different address pools, so pick the product before you register anything.
  2. Copy the connection URL and both IPs. Find them under Setup, then Outbound, as described in where to find your proxy connection details. Store the URL as a server-side secret named QUOTAGUARDSHIELD_URL. It has the form https://username:password@<your-quotaguard-shield-host>:9294 (Shield setup docs).
  3. Route only the Paystack client. Point the HTTP client that calls api.paystack.co at the proxy. You do not need to send unrelated traffic through it. Check every place that uses the secret key: checkout, verification, recurring charges, transfers, and any cron job or export script.
  4. Start with test mode. In the Paystack Dashboard, open the API Keys and Webhook Settings tab, click "+Add IP address" for the test environment, add both QuotaGuard IPs, and click "Save changes". Run your test-key checks (below).
  5. Then do live. Repeat on the live list. If you already have entries there, keep them until every live caller is confirmed on the new route.

Add both addresses, not just the one you happen to see in a quick check. QuotaGuard uses a primary and a secondary IP for failover, and traffic may route through either one at any time. The pair uses 2 of your 10 slots on each list.

Check the path before you depend on it

The samples below are illustrative; not tested. We did not run them against Paystack or QuotaGuard for this article; they follow Paystack's and QuotaGuard's documentation. Use your test secret key first.

# Illustrative; not tested.
import os

import requests

# Shield's URL starts with https://, so the client opens TLS to the proxy first.
proxy_url = os.environ["QUOTAGUARDSHIELD_URL"]
session = requests.Session()
session.proxies = {"http": proxy_url, "https": proxy_url}

# 1. Which address does the outside world see through this session?
#    No Authorization header here: never send your secret key to an echo service.
print(session.get("https://ip.quotaguard.com", timeout=10).text)

# 2. One read-only secret-key call (Check Balance), sent only to Paystack.
r = session.get(
    "https://api.paystack.co/balance",
    headers={"Authorization": f"Bearer {os.environ['PAYSTACK_SECRET_KEY']}"},
    timeout=10,
)
print(r.status_code, r.json().get("message"))

The same two checks with curl:

# Illustrative; not tested.
curl -x "$QUOTAGUARDSHIELD_URL" https://ip.quotaguard.com
curl -x "$QUOTAGUARDSHIELD_URL" https://api.paystack.co/balance \
  -H "Authorization: Bearer $PAYSTACK_SECRET_KEY"

The first call should return one of your two Shield IPs. That proves which address this client uses. It does not prove that a different SDK or worker in your app uses the proxy, so run it from each process that calls Paystack. The second call uses the Check Balance endpoint, which reads your balance and does not move money. Do not start a charge or a transfer as a connectivity test.

If a call is blocked

Paystack does not document the exact HTTP status, error code or message it returns when a secret-key request comes from an address that is not on the list. Its errors page describes the general error format and says a 401 means the request was not authorized, for example because of an invalid or missing secret key. So do not key your alerting off a guessed string. When a secret-key call starts failing right after you change the list, work through it in this order:

  • Run the echo check from the same process. If the address is not one of your pair, the client is not using the proxy.
  • If the proxy returns 407, check the proxy username, password and URL.
  • Confirm you added the pair to the right environment. A sk_test_ key is checked against the test list, and a sk_live_ key against the live list.
  • Read the message in Paystack's response body. It is the most direct clue you will get.

Other ways to get a fixed address

You do not need a proxy if you already have stable addresses:

  • A VM with a reserved public IPv4, or a NAT gateway with fixed addresses in your own cloud account. Register those addresses directly.
  • A host that offers dedicated outbound IPs as a paid feature. Check that it gives you individual IPv4 addresses, since Paystack will not take a range.
  • A single office or VPS address. Fine for a low-volume backend, but you have one address and no standby.

A proxy fits when your host has no stable egress, when you want to route only the Paystack client, or when you want the same two addresses to follow the app if it moves hosts. QuotaGuard Shield starts at $29 a month (pricing).

QuotaGuard Static is the alternative if you do not need the encrypted proxy hop. It uses a plain HTTP proxy connection on port 9293, set as QUOTAGUARDSTATIC_URL with the form http://username:password@<your-quotaguard-proxy-host>:9293, and starts at $19 a month. TLS to Paystack is still end to end (how the HTTP proxy handles HTTPS). Remember that Static and Shield IPs differ, so register the pair for the product you actually use.

On both products, Starter, Production and Business plans use a shared static pair. An allowlist is not authentication, so a shared address still means a leaked key needs rotating. Enterprise plans include dedicated IPs if you want addresses no one else uses.

Webhooks are a separate path

Paystack webhooks travel from Paystack to your server, so an outbound proxy does not change them. Paystack publishes its own webhook source IPs and recommends verifying the signature header; see its webhooks guide.

What to do next

Route your Paystack client through Shield, confirm the echo address from every caller, add both IPs to the test list and check with your test key, then repeat for live. The Paystack IP allowlisting docs give the step-by-step reference, the Shield setup docs cover client configuration by language, and the Flutterwave guide walks through a similar payment-API allowlist. If a step is unclear, write to QuotaGuard Support.

QuotaGuard Static IP Blog

Practical notes on routing cloud and AI traffic through Static IPs.

Reliability Engineered for the Modern Cloud

For over a decade, QuotaGuard has provided reliable, high-performance static IP and proxy solutions for cloud environments like Heroku, Kubernetes, and AWS.

Get the fixed identity and security your application needs today.