Integrations & API
Kustom
Connect the Kustom checkout: credentials for Test and Live, capture, markets, push URL, test purchases, the storefront's checkout and disconnecting.
Kustom (formerly Klarna Checkout) is the checkout in BunStack.
Where: Stack › Kustom and Storefronts › [storefront] › Checkout.
The customer pays in Kustom's widget inside BunStack's checkout page. BunStack creates the order, captures the money and sends refunds and cancellations to Kustom. How the checkout looks to the customer is on The checkout. How you capture and refund is on Capture, refund and cancel.
Connect Kustom
- Get the API username and password in Kustom's merchant portal. Test and Live have different credentials.
- Open Stack › Kustom.
- Choose Test · playground or Live · production under Environment.
- Fill in Username and Password.
- Press Connect Kustom.
- Open Storefronts › [storefront] › Checkout and choose Kustom (hosted) under Provider.
The storefront now takes payment through Kustom, in the environment in use.
| Field | What you enter |
|---|---|
| Environment | Test · playground (api.playground.kustom.co) or Live · production (api.kustom.co) |
| Username | The API username from Kustom's merchant portal |
| Password | The API password from the same portal |
- The first connection makes its environment the one in use. This also applies to the first connection after a disconnect.
- A connection on Live puts Live in use at once. Connect on Test first if you want to store the Live credentials without using them.
- The environment in use applies to every storefront in the workspace.
- You cannot choose Kustom (hosted) until Kustom is connected.
- BunStack stores the credentials encrypted. The admin never shows them again.
The credentials check
Connect Kustom saves the credentials and tries them against Kustom. BunStack runs the same check every time you save. Re-verify tries the environment in use again, without you entering anything.
| Kustom answers | Status | What to do |
|---|---|---|
| Accepts the credentials | CONNECTED | Nothing. |
| HTTP 401 or 403 | ERROR, with the reason | Check the username and password. They may belong to the other environment. |
| 5xx, no answer within 8 seconds or the host cannot be reached | Unchanged | The integration page shows Kustom could not be reached — nothing changed. Try again. Run the check again later. |
An environment with ERROR keeps its settings.
Test and Live
Test and Live each have their own username, password and status. The integration page shows both. in use marks the environment new checkouts go to.
| Button | What happens |
|---|---|
| Save Test credentials, Save Live credentials | Saves and checks the environment's credentials. The environment in use does not change. |
| Update Test credentials, Update Live credentials | The same button when the environment already has credentials saved. |
| Check stored Test login, Check stored Live login | Checks the saved credentials again. You enter nothing. |
| Use Test, Use Live | Asks Use Kustom Live? (or Test) and then puts the environment in use. Use Live waits for the rows marked holds Use Live on the Go live page, see Use Live. |
- Use Test and Use Live first check the environment's saved credentials. If Kustom does not accept them, nothing changes.
- The dialog says whether orders from the environment you leave can still be captured, refunded and cancelled, for example Orders paid in Test are still captured, refunded and cancelled in Test.
- A storefront cannot go live while Test is in use. The Kustom environment check on Go live is red until Live is in use.
The order's environment
- BunStack captures, refunds and cancels an order in the environment it was paid in. The environment in use does not matter.
- For example, BunStack captures a live order in Live while Test is in use, and refunds a test order in the playground while Live is in use.
- When the order's environment is not connected, BunStack refuses the action. The message names the environment: This order was paid in Kustom Live; Live is not connected.
- An order without a saved environment uses its checkout session's environment. Without both, BunStack uses the environment that is in use now.
- The confirmation page and Kustom's push go to the environment the checkout was opened in.
Credentials saved before 2 October 2026
Before 2 October 2026 BunStack saved one pair of credentials for both environments. The pair counts as belonging to the environment where it was last checked, and the integration page names it. When Kustom did not accept the pair there, the integration page shows Check them on Live or Check them on Test. The button tries the pair in the other environment. The pair moves there only if Kustom accepts it. Use Live runs the same check before the switch.
Capture, markets and push URL
Three cards appear once Kustom is connected.
| Card | What it does |
|---|---|
| Capture | Chooses when the money is captured: On fulfilment or Auto. |
| Markets | Shows what Kustom answered for each country your shops sell to, in the currency a customer from there pays in. The Currencies & payment check on Go live counts the answers. |
| Push URL | The address Kustom calls when the customer has paid. It contains one token per workspace. |
Capture
| Mode | What happens |
|---|---|
| On fulfilment (default) | Kustom reserves the amount at purchase. BunStack captures it when you mark the order as shipped. A partial shipment captures only that part. |
| Auto | Kustom captures the whole amount when the customer completes the purchase. |
Warning: A reservation is valid for 28 days. BunStack sends the Authorisation expiring notification when three days remain. Ship the order before the reservation expires.
Markets
BunStack asks Kustom about every country your shops sell to, in the currency a customer from there pays in, and keeps the answer. You do not add pairs yourself.
- Pairs nobody has asked about go to Kustom when you open Stack › Kustom, a storefront's Checkout tab or its Go live page.
- Press Check with Kustom to ask about every pair again, for example when Kustom has added a market to your contract.
- Each question opens a checkout at Kustom that is never completed. Nobody pays anything.
- The checkout keeps answers too. When Kustom refuses a pair as a customer is about to pay, the pair shows under Kustom said no.
- The answers apply to the environment Kustom is in. After Use Live, BunStack asks about the pairs again.
| Part | What it shows |
|---|---|
| Kustom said no | The pairs Kustom refused, with the storefronts, what Kustom said and when. Ask Kustom to add the market and press Check with Kustom. |
| Not asked yet | The pairs nobody has asked Kustom about yet. |
| Kustom takes | The pairs Kustom takes. |
The currency per country follows Auto-pick by visitor country under Pricing rules. See The checks before go-live. You choose the countries only under Sells to on the Checkout tab.
- The checkout stops a pair Kustom has refused and offers the customer a currency that works.
- Until Kustom has had its first question in the environment, the list typed earlier applies. The card shows it. An empty list lets every pair through.
- Under Stack › Payments, a red row shows the countries that cannot pay, per storefront.
- The card lists Kustom's core markets: AT, BE, CH, CZ, DE, DK, ES, FI, FR, GB, GR, IE, IT, NL, NO, PL, PT and SE. There the customer pays in the country's currency with Kustom's own payment methods. The rest of the EU pays in EUR by card, Apple Pay or Google Pay. Use the list when you talk to Kustom.
Push URL
- The checkout sessions send the address to Kustom automatically. You only need it if Kustom asks you to register a push URL.
- Rotate token makes the old address invalid at once. BunStack refuses checkouts opened before the rotation when Kustom validates the purchase.
Test purchases
In Test · playground the widget shows "Test Mode" and the Test Data button.
- Connect Kustom with the credentials for Test · playground.
- Choose Kustom (hosted) under Provider in the storefront.
- Open the storefront and add an item to the cart.
- Go to the checkout.
- Press Test Data in the widget. It fills in a test customer.
- Complete the purchase.
Kustom confirms the payment without real money. BunStack creates the order and sends the emails as usual. The order page shows PLAYGROUND, and the reports do not count the order. See Test orders. The widget's terms text shows Kustom's own test merchant until the Live account is connected.
Note: Kustom's playground may lack SEK. Then test in NOK or DKK.
The storefront's checkout
Under Storefronts › [storefront] › Checkout you choose Kustom (hosted) under Provider. It is required to go live. The Native test checkout, the lock for live storefronts and the payment logos are under Checkout settings per storefront.
Which payment methods the widget offers depends on your Kustom contract.
Disconnect
Warning: BunStack refuses Disconnect while a live storefront uses Kustom as its checkout. The integration page lists the storefronts with a link to their Checkout tab. Change the checkout or pause the storefronts first.
A refusal removes nothing. Otherwise Disconnect does this:
- deletes the username and password for both environments
- removes the Kustom settings: environment, capture mode, markets and push token
- stops the order flow in every storefront set to Kustom
There is no fallback checkout. When you reconnect, you enter everything again.