IP address allowlist (IP_NOT_ALLOWED)
Your live key (sk_live_…) collects payments and sends transfers. If it leaks (public Git repository, logs, compromised computer), anyone can use it. The allowlist limits the live key to your servers’ IP addresses: a stolen key becomes useless anywhere else.
How it works
Section titled “How it works”| Situation | Requests with the live key |
|---|---|
| Empty list (default) | Accepted from any address |
| At least one address in the list | Accepted only from the listed addresses |
- The test key (
sk_test_…) is never restricted: you can develop from anywhere. - Up to 20 addresses, IPv4 or IPv6. No ranges (CIDR): one address per entry.
- Private or local addresses (
192.168.x.x,10.x.x.x,127.0.0.1…) are refused: Senfenico never sees those addresses. - Every addition or removal is confirmed to you by email.
Enable the restriction
Section titled “Enable the restriction”-
Open Developer › IP allowlist in the dashboard (
/user_dashboard/ip_allowlist/). -
Find your server in the table of addresses that used your live key over the last 7 days. For each address it shows the number of accepted and refused requests, and the time of the last call. Click Allow: the form is prefilled.
Your server isn’t listed yet? Type its address manually (see find your server’s IP).
-
Add a label (for example “Production server”).
-
Confirm with the code from your authenticator app, or with your password if you haven’t turned on two-factor authentication.
The change applies immediately. To remove an address, use the delete button on its row, with the same confirmation.
Find your server’s IP
Section titled “Find your server’s IP”The address to allow is the one Senfenico sees: your server’s public outbound address. Not your computer’s, and not a private address.
- Most reliable: the recent addresses table in the dashboard. Make a call with the live key from your server (for example
GET /v1/payment/balances/), then reload the page. - From the server: ask a service that returns your public IP.
# Run this on the server, not on your laptopcurl -4 https://api.ipify.org; echoecho file_get_contents('https://api.ipify.org');import requestsprint(requests.get("https://api.ipify.org", timeout=10).text)const ip = await (await fetch('https://api.ipify.org')).text();console.log(ip);api.senfenico.com is reachable over IPv4: it’s your server’s public IPv4 address you need to allow. The list also accepts IPv6, just in case.
Refused request: IP_NOT_ALLOWED
Section titled “Refused request: IP_NOT_ALLOWED”A live request sent from an address that isn’t in the list gets a 403:
{ "status": "False", "message": "Requests from IP address 196.28.3.4 are not allowed for this API key. Add it in your dashboard (Developer > IP allowlist).", "error_code": "IP_NOT_ALLOWED"}- The message contains the address Senfenico saw. If it really is your server, add it.
- Refused requests also show up in the recent addresses table, with their refusal count.
statusis the string"False"here: check the HTTP code first (see authentication).
Locked out
Section titled “Locked out”- Your server’s IP changed: log in to the dashboard and add the new address. The recent addresses table shows it, among the refused requests.
- You can no longer access the dashboard: email
contact@senfenico.com. The Senfenico team can clear your list; your live key is then accepted from any address again, and you are notified by email. Set up the list again as soon as possible.