BLOCKED origin, and safely reconcile 409 RESOURCE_ CONFLICT responses when you retry a create call.localhost becomes http:/ /, everything else becomes https:/ /) and returns the resolved value together with a KRN identifier.*. example. com are always supported. The bare wildcard * is supported only in non-production environments.Klarna-Idempotency-Key (UUID v4 or higher) on create requests to make retries safe. Without the header, a 409 RESOURCE_ CONFLICT is safe to treat as success. With the header, a 422 IDEMPOTENCY_ KEY_ MISMATCH indicates a client-side bug and must not be treated as success.state of either ALLOWED or BLOCKED. To attempt remediation of a BLOCKED origin, delete it and re-create it.early-release and is not generally available in the test environment or production. Access is gated per account. Coordinate with your Klarna integration contact before you begin building, so the feature can be enabled for the accounts you want to manage.account-credentials:read for listAllowedOriginsaccount-credentials:write for createAllowedOrigin/account/ integration/ inbound-restrictions/ origins endpoints to manage origins for your own account./accounts/ {partner_ account_ id}/ integration/ inbound-restrictions/ origins endpoints to manage origins for a child Partner Account you manage.Klarna-Idempotency-Key headers on create calls.400 BAD_ REQUEST errors at create time.host with an optional port — never include a scheme:1 and 65535. When present, append it as :<port>.xn--mnchen-3ya. example. com).localhost is supported.localhost and localhost:<port> resolve to http:/ /.https:/ /.* resolves to https:/ /* and is accepted only in non-production environments.*. example. com are supported in all environments. They match any single subdomain segment under the parent zone. Use them sparingly — every additional wildcard widens the surface area that can load the Klarna Web SDK on your behalf.| Do | Don't |
|---|---|
shop. | https:/ — don't include the scheme; Klarna resolves it. |
checkout. | shop. — paths aren't part of an origin. |
*. | * or *. — the bare wildcard is allowed only in non-production, and only single-segment wildcards like *. are supported. |
localhost or localhost:3000 | Shop. — submit hostnames in lowercase. |
xn--mnchen-3ya. | shop. or shop. — port must be 1–65535. |
partner_ account_ id path parameter.size, starting_ after, and ending_ before query parameters are accepted for forward compatibility, but you don't need to paginate to read the full list today.curl -X GET \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://api.klarna.com/account/integration/inbound-restrictions/origins200 OK response:{
"origins": [
{
"origin_id": "krn:network:global:live:account:allowed-origin:f7e8d9c0-b1a2-3456-cdef-7890abcdef12",
"origin": "http://localhost:3000",
"state": "ALLOWED",
"created_at": "2026-03-01T08:00:00.000Z",
"updated_at": "2026-03-01T08:00:00.000Z"
},
{origin field. Always set the Klarna-Idempotency-Key header so retries are safe. The header value must be a UUID v4 (or higher) and may be 1–255 characters long.curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Klarna-Idempotency-Key: 4f3a8b2e-7d51-4a3c-9c2e-1a2b3c4d5e6f" \
https://api.klarna.com/account/integration/inbound-restrictions/origins \
-d '{"origin": "new-shop.example.com"}'201 Created response:{
"origin_id": "krn:network:global:live:account:allowed-origin:206bbb83-9b6e-46fa-940d-337153c04a58",
"origin": "https://new-shop.example.com",
"state": "ALLOWED",
"created_at": "2026-04-14T10:30:00.000Z",
"updated_at": "2026-04-14T10:30:00.000Z"
}Location header pointing at the new resource. Persist the returned origin_ id (the KRN) in your own systems so you can later read or delete the origin without listing first.Klarna-Idempotency-Key header (or with a different key) and the origin already exists, Klarna returns 409 RESOURCE_ CONFLICT:{
"error_id": "7c123a8e-321b-4a2b-9fc4-2a7e89b5c0c5",
"error_type": "RESOURCE_ERROR",
"error_code": "RESOURCE_CONFLICT",
"error_message": "The origin https://shop.example.com is already configured for this account."
}origin_ id.Klarna-Idempotency-Key on create calls. With the header in place, a retry of the same request returns the original 201 Created response (including the original origin_ id), so you don't need a follow-up list call to reconcile.Klarna-Idempotency-Key value with a different request body, Klarna returns 422 IDEMPOTENCY_ KEY_ MISMATCH:{
"error_id": "9bcf5d12-8ef7-46a9-b2cb-d24a9b9db3c2",
"error_type": "INPUT_ERROR",
"error_code": "IDEMPOTENCY_KEY_MISMATCH",
"error_message": "The Klarna-Idempotency-Key has already been used with a different request body."
}422 IDEMPOTENCY_ KEY_ MISMATCH response means your client reused an idempotency key for a semantically different request. This is a client-side bug — the origin you tried to add was not stored, and you must not treat the response as success. Generate a fresh UUID v4 for each new logical request and retry.origin_ id (the KRN) and want to confirm its current state or audit metadata such as created_ at and updated_ at.curl -X GET \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://api.klarna.com/account/integration/inbound-restrictions/origins/$ORIGIN_ID200 OK response:{
"origin_id": "krn:network:global:live:account:allowed-origin:206bbb83-9b6e-46fa-940d-337153c04a58",
"origin": "https://shop.example.com",
"state": "ALLOWED",
"created_at": "2026-04-01T09:45:00.000Z",
"updated_at": "2026-04-01T09:45:00.000Z"
}BLOCKED origin.curl -X DELETE \
-H "Authorization: Bearer $ACCESS_TOKEN" \
https://api.klarna.com/account/integration/inbound-restrictions/origins/$ORIGIN_ID204 No Content. After the call, the Klarna Web SDK will stop loading from that origin. There's no soft-delete and no recovery — to bring the origin back, create it again.state field with one of two values:| State | Meaning |
|---|---|
ALLOWED | Klarna accepts requests from this origin to load the Klarna Web SDK. |
BLOCKED | The origin is on the allowlist, but Klarna isn't currently permitting it (typically suspended for a policy violation or pending verification). Requests from this origin are turned away. |
PATCH endpoint to change state. If one of your origins is BLOCKED and you believe the underlying issue has been resolved, follow this remediation pattern:state is BLOCKED.Klarna-Idempotency-Key. Klarna re-evaluates the origin and, if the underlying issue is resolved, returns it in state: ALLOWED.BLOCKED, contact your standard Partner support channel — the underlying suspension hasn't been cleared and another delete-and-create cycle won't help.| Do | Don't |
|---|---|
Generate a fresh Klarna-Idempotency-Key (UUID v4 or higher) per logical create request, reuse it across retries, and treat the resulting 409 RESOURCE_ as a successful terminal outcome. | Reuse a Klarna-Idempotency-Key across semantically different requests, or treat the resulting 422 IDEMPOTENCY_ as success — the origin was not stored. |
Persist the returned origin_ (KRN) in your own systems so reads and deletes don't require a list call first. | Hard-code origin_ values across environments — they're issued per account, per environment. |
Submit hostnames in lowercase ASCII (use punycode for internationalized domains). | Submit origins with a scheme ( https:/) or a path (shop.). |
Keep wildcards narrow — prefer shop. over *. whenever the set of subdomains is stable. | Use the bare wildcard * outside of non-production environments. |
Audit your allowlist regularly and remove origins for storefronts you no longer operate. | Assume a BLOCKED origin will recover on its own; you must delete and re-create to retry. |
| Action | OperationId | Method | Path | Required scope |
|---|---|---|---|---|
| List origins (own) | listAllowedOrigins | GET | /account/ | account-credentials:read |
| Add origin (own) | createAllowedOrigin | POST | /account/ | account-credentials:write |
| Read origin (own) | readAllowedOrigin | GET | /account/ | account-credentials:read |
| Delete origin (own) | deleteAllowedOrigin | DELETE | /account/ | account-credentials:write |
| List origins (child) | listAllowedOriginsForPartnerAccount | GET | /accounts/ | account-credentials:read |
| Add origin (child) | createAllowedOriginForPartnerAccount | POST | /accounts/ | account-credentials:write |
| Read origin (child) | readAllowedOriginForPartnerAccount | GET | /accounts/ | account-credentials:read |
| Delete origin (child) | deleteAllowedOriginForPartnerAccount | DELETE | /accounts/ | account-credentials:write |
| Field | Type | Description |
|---|---|---|
origin_ | string | KRN identifier for the resource (for example, krn:network:global:live:account:allowed-origin:206bbb83-9b6e-46fa-940d-337153c04a58). The live segment is live in production and test elsewhere. |
origin | string | Resolved origin value, including the scheme Klarna assigned (http:/ for localhost, https:/ for everything else). |
state | string | One of ALLOWED or BLOCKED. See Recover from a BLOCKED origin. |
created_ | string | ISO 8601 timestamp (UTC) when the origin was added. |
updated_ | string | ISO 8601 timestamp (UTC) when the origin was last modified by Klarna (for example, on a state change). |
| HTTP status | Error code | When you'll see it | Recommended action |
|---|---|---|---|
400 | BAD_ | The origin value violates the input format (scheme included, invalid host, port out of range, bare * in production, etc.). | Fix the payload and retry. Don't reuse the previous Klarna-Idempotency-Key. |
401 | UNAUTHORIZED | The access token is missing, expired, or doesn't carry the required scope. | Refresh the token. Confirm account-credentials:read for read calls and account-credentials:write for create and delete calls. |
404 | RESOURCE_ | The origin_ doesn't exist for this account, or the partner_ isn't a child of your Acquiring Partner account. | List the origins for the right scope and reconcile your local state. |
409 | RESOURCE_ | An equivalent origin already exists on the allowlist and the request didn't carry a matching Klarna-Idempotency-Key. | Safe to treat as a successful terminal outcome — the origin is on the allowlist. Use a list call to recover the origin_. |
422 | IDEMPOTENCY_ | The Klarna-Idempotency-Key value was previously used with a different request body. | Don't treat as success. Fix the client bug, generate a new Klarna-Idempotency-Key, and retry the intended request. |
500 | INTERNAL_ | A transient server-side error. | Retry with exponential backoff, reusing the same Klarna-Idempotency-Key for create calls. |