IP Whitelist
Lock your production API keys to the servers you trust. Once a store has a whitelist, Tahweel accepts production requests only from those addresses — every other call is rejected, even with valid credentials.
How it works
Every production API call runs through a fixed chain of checks. The whitelist sits immediately after your credentials are verified, so a stolen key is useless from an unknown network.
API key & secret
Credentials verified
IP whitelist
Is the caller listed?
Account & store
Active and approved
Subscription
Plan still valid
Listed — the request continues through the remaining checks.
Not listed — rejected with 403, nothing is charged.
Try the rules
This checker runs the same validation Tahweel applies to your list. The sample store below allows two addresses — test any IP against them.
Waiting for an address
Type an IP or pick an example below.
Enable it
Open your store settings
In the Merchant Dashboard, go to Stores → your store → View and scroll to the IP Whitelist card, just below API Credentials.
Find your server's outgoing IP
ImportantRun this on the server that calls the API — not on your laptop. Many setups send traffic out through a different address than the one you connect to.
curl ifconfig.meAdd each address
Enter the IP with an optional label such as Production server, then press Add IP. Repeat for every server that calls the API.
Save with your password
Goes liveClick Save Whitelist and confirm with your account password. The badge switches to Enforced and the rule applies to the very next request.
What it looks like in your dashboard
IP Whitelist
Production API keys only
Production server
Backup region
Verify it straight away with a production call from the whitelisted server:
curl -X POST "https://backend.tahweel.io/merchant/payment/create" \
-H "Content-Type: application/json" \
-H "api-key: your_production_api_key" \
-H "api-secret: your_production_api_secret" \
-d '{ "amount": 10, "currency": "USD" }'What you can add
Accepted
Rejected
Private and reserved addresses are blocked on purpose: a request from the public internet can never arrive from one, so whitelisting it would only lock you out of your own integration.
Rejected requests
A call from an address that is not on the list is refused before any payment logic runs. The response names the exact IP Tahweel saw, so you can add it without guessing.
{
"status": 403,
"message": "Request IP is not whitelisted for this store",
"ip": "203.0.113.45"
}Use the ip field
That address is the one our servers observed for your request. If it differs from what you expected, your traffic leaves through a different route — a NAT gateway, proxy or load balancer. Whitelist the address shown here.
Good to know
You cannot lock yourself out
The whitelist never limits dashboard access. If an address is wrong, sign in from anywhere and correct it.
An empty list means open
With no addresses saved, production keys work from anywhere. Removing every entry turns the restriction off.
One entry per server
Running several app servers, workers or regions? Add the outgoing IP of each one. Every store keeps its own list.
Watch out for changing IPs
Cloud servers without a reserved IP, serverless platforms and office networks rotate addresses. Use a static or NAT gateway IP.
Before you switch it on
Add every server that calls the API first, then save once. If your integration is live and the saved list misses a server, its payments start failing with 403 immediately. Testing from a browser or home network is not a reliable check — those addresses usually differ from your server's.
Recommended setup
- Reserve a static outgoing IP for your production servers (Elastic IP, NAT gateway or equivalent).
- Whitelist that address, plus any backup or worker servers, and label each one.
- Keep testing on sandbox keys — they are never restricted, so development is unaffected.
- Review the list whenever you move hosting, add a region or decommission a server.