Integrations & API
Kustom: order flow, errors and limits
What BunStack and Kustom do from checkout to refund, where errors show, the Needs attention reasons and the rate limits.
Where: the order, Abandoned checkouts and Stack › Kustom.
What happens when
| Moment | What BunStack does |
|---|---|
| The customer opens the checkout | Creates a session at Kustom with lines, VAT, discount and shipping. Embeds the widget. |
| The customer clicks buy | Kustom asks BunStack to validate the purchase. BunStack checks the session, that the storefront is live, the stock, the country, the amount and the currency. A refusal sends the customer back to the checkout with the reason. |
| The customer lands on the confirmation page | Creates the order as paid and sends the order confirmation. |
| About 2 minutes later | Receives Kustom's push. When the order already exists nothing happens. Otherwise the push creates the order. |
| Every 15 minutes | Reads back sessions that got neither a confirmation nor a push. Completed ones become orders. BunStack flags sessions it could not ask Kustom about. |
| Fraud check | Puts Kustom's decision on the order when it arrives at the push address. |
| Fulfilment | Captures the shipped lines, and the shipping on the first capture. This happens after the booking and before BunStack marks the order as shipped. |
| Refund, cancel | Sends them to Kustom. Nothing changes in BunStack until Kustom answers OK. |
| Every day 06:15 UTC | Sends the Authorisation expiring notification for every order that is not fully captured and whose reservation expires within 3 days. |
- Kustom retries the push after 5, 15, 30 and 60 minutes. After that Kustom retries every 4 hours for 48 hours.
- BunStack checks stock only for variants that stop at zero.
- A capture that fails leaves the order unshipped. The booked shipment stays until the next attempt.
- Kustom's order ID is on the order under Customer › Kustom order ID, with Copy. It is the same ID Kustom's portal shows.
- Kustom receives BunStack's order number as merchant reference 1. With ProSmart connected, BunStack can send Kustom's order ID on to ProSmart. See What the order includes.
Errors and where they show
| Where | What you see |
|---|---|
| Stack › Kustom | ERROR with the reason from the last check. Each environment shows its own status. |
| The order | BunStack refuses capture, refund and cancel when the order's environment is not connected. The message names the environment. |
| The checkout | The customer sees a short message: the checkout is not activated, the currency does not work for the country, an item is sold out or the country is not supported. |
| Abandoned checkouts | promotion failed with Retry promotion: Kustom reported paid, but BunStack did not create the order. outcome unknown: BunStack could not reach Kustom. Check the session in Kustom's portal. |
| Notifications and email | An order that could not be created, or an unresolved session, gives a notification and an email to the contact address. |
An order can get Needs attention from Kustom. The reason is on the order.
| Reason | Means | What to do |
|---|---|---|
| oversold | The customer paid for more units than there were. The order is kept. | Choose to ship, back-order or refund. |
| Amount or currency mismatch | Kustom's amount or currency differs from the session. BunStack creates the order anyway. | Compare the order with Kustom's portal before you ship. |
| Country mismatch | The address from Kustom is in another country than the one VAT was calculated for. | Check the VAT before you ship. |
| fraud pending | Kustom's fraud check is running. Capture is blocked. | Wait until Kustom accepts the order. |
| fraud rejected | Kustom rejected the order in its fraud check. | Do not ship. Cancel the order. |
| Kustom cancelled | Kustom cancelled the order. The reservation is no longer valid. | Do not ship. Cancel the order. |
Rate limits
- New checkout session: 10 per minute per storefront and IP address.
- The confirmation page: 10 per minute per Kustom order.
- A token protects validation and push, not a limit. A wrong token gets the answer 404.