Klarna
Connect Klarna to capture and refund orders, make payment links, answer disputes, and reconcile your payouts. MCP setup guide for Claude and ChatGPT.
You paste one Klarna API key from the Merchant Portal. PopMCP works out from the key whether it is live or playground, and finds its region by trying it.
- Setup time
- 3 min
- Auth
- API credentials
- API base URL
- Live: https://api.klarna.com (Europe), https://api-na.klarna.com (North America), https://api-oc.klarna.com (Oceania). Playground: the same with .playground, such as https://api.playground.klarna.com. PopMCP picks the right one.
- Rate limits
- Per merchant id and per kind of operation. Live: 40 requests per second for creating sessions, 200 for most others. Playground: 5 and 50. Over a limit Klarna answers HTTP 429. Request bodies are limited to 1 MB.
Before you begin
- A Klarna merchant account. For test data only, a free test account at portal.playground.klarna.com is enough.
- A login to the Klarna Merchant Portal (Klarna's documents also call it the Partner Portal) with the rights to manage API keys.
- Klarna taken directly from Klarna. If you offer Klarna through a payment provider, you may not have a Klarna API key of your own.
Get your credentials
Open Klarna API keys
Sign in to the Merchant Portal: portal.klarna.com for live, portal.playground.klarna.com for test data. Open Settings, then Klarna API keys. If you have more than one store, choose the one you want first: a key belongs to one merchant id.
Klarna API keys
Keys that connect Klarna to your store.
Only an admin can create and manage keys.
Generate a key and save it
Select Generate new Klarna API key. Klarna shows the key only once, so download it. It starts with klarna_live_api_ on live and klarna_test_api_ on the playground. A new key just for PopMCP is the safest choice, because you can disable it on its own.
Klarna API keys
Paste it into PopMCP
Open Klarna in PopMCP, paste the key into Klarna API key, and connect. There is nothing else to fill in: PopMCP reads live or playground from the key and finds your region, Europe, North America or Oceania, by trying it. It then asks for an order that cannot exist and reads one payout, which change nothing.
Only if yours is an older credential
Most people skip this. If Klarna gave you a username and password rather than a key that starts with klarna_, put the password in Klarna API key and the username under More options. Older credentials do not say live or playground, so PopMCP tries each until one answers.
Turn on disputes once, if you use them
The Disputes API has to be turned on once for your merchant id. Allow writes on the connection, then ask the AI to enroll your merchant id with klarna_enroll_merchant_in_disputes. Until then the dispute list can come back empty or refused, even when you have disputes.
Disputes
You can always see and answer disputes here in the portal too. Enrolling only opens the API.
Connect in PopMCP
Open your workspace, choose Klarna in the marketplace, and fill in the connect dialog:
| Field | What to enter |
|---|---|
| Klarna API keysecret | From Settings > Klarna API keys in the Klarna Merchant Portal: Generate new Klarna API key. Stored encrypted, used server-side only.Encrypted with AES-256-GCM on save and never shown again. |
| Username (only for older credentials)text | Only if your credential came as a username and password. Put the password in the API key box above. |
PopMCP verifies the credential against Klarna immediately. On success the connection flips to Verified and its MCP tools are provisioned.
Verify it worked
PopMCP shows Klarna as Verified, named with your merchant id when it can read one, the region, and live or playground. Ask for an overview: klarna_account_overview answers with the system, your latest payouts and the disputes waiting on you.
Troubleshooting
"Klarna did not accept this key on any of its systems"
Why: The key was copied incompletely, disabled, or deleted. Klarna switches off keys unused for two months and deletes them after ten.
Fix: Generate a new key under Settings, Klarna API keys, and paste that.
"New Klarna keys start with klarna_live_api_ or klarna_test_api_"
Why: What you pasted is not a key, or it is the password of an older credential.
Fix: Paste the whole key. For an older credential, add its username under More options.
"Klarna knows this key but refused it"
Why: The key was disabled, or belongs to a different kind of account, such as one run by a payment provider.
Fix: Check the key is active in the portal, or generate a new one. If a payment provider runs your Klarna, ask them.
A tool says the order does not exist
Why: Klarna only finds orders by their own UUID, not your order number or the short Klarna reference, and playground orders do not exist on live.
Fix: Copy the order id from the Merchant Portal or your store. Klarna has no way to search orders by other fields.
A capture or refund is refused
Why: The amount is more than the order allows, or the order is cancelled or expired.
Fix: Ask for the order: klarna_get_order shows can_capture_up_to, can_refund_up_to and can_cancel.
The dispute list is empty, or answers 403
Why: The Disputes API is not turned on for this merchant id, or the account uses an older version.
Fix: Run klarna_enroll_merchant_in_disputes once, or try the v3, v2 and v1 tools through klarna_search_tools.
Payout tools answer 403
Why: This key cannot read settlements.
Fix: Generate a new key, or ask Klarna merchant support to allow it.
Reference
Zoho Books
Connect Zoho Books to manage invoices, bills, customers, vendors, payments, expenses, banking, journals, taxes and projects.
Acuity Scheduling
Connect Acuity Scheduling to book and manage appointments, availability, clients, intake forms, coupons, and orders. MCP setup for Claude and ChatGPT.