IP allowlist
Lock your production secret key to your servers' IP addresses.
Context and key considerations
Each shop can have a list of allowed IP addresses or CIDR ranges. When enforced, the production secret key (and any access token minted with it) only authenticates from those IPs: a leaked key stops working outside your servers.
What it applies to
Only server-to-server calls with the production secret key. Never the publishable key, the hosted checkout, or anything your buyers use — they call from any network. Sandbox is not restricted, so your team can integrate from anywhere.
Observation, enforcement, exemption
A shop starts in observation: we record the IPs you call from and nothing is blocked. With that data, support registers your IPs and switches enforcement on. A new shop is born with the list required: its production secret key does not authenticate until its IPs are registered. Your dashboard, under Shops & API keys, shows the mode, the allowed IPs, the IPs we have seen you call from, and the latest rejected calls.
Errors you can get
From an IP outside the list you get a 403 carrying the IP we saw, so you can diagnose it without a ticket. The configured list never travels in the response.
HTTP/1.1 403 Forbidden
{
"error": {
"code": "ip_not_allowed",
"type": "permission_error",
"message": "Request IP is not in the IP allowlist configured for this shop. Contact Key2Pay support to add it.",
"requestId": "req_mtvia1t4_9hj9oxoj",
"details": { "ip": "203.0.113.42", "shopId": "SHP-…" }
}
}HTTP/1.1 403 Forbidden
{
"error": {
"code": "ip_allowlist_required",
"type": "permission_error",
"message": "Production API keys require an IP allowlist. Ask Key2Pay support to register your server IPs before going live.",
"requestId": "req_…",
"details": { "ip": "203.0.113.42", "shopId": "SHP-…" }
}
}Requesting changes
Open a support ticket with the shop, the IPs or ranges to add or remove, and ideally the requestId of a rejected call. Changes are audited. If you are about to change provider or egress IPs, tell us before the switch so your payments are not interrupted.