BunStackDocs

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.

Last updated · 4 min read

Where: the order, Abandoned checkouts and Stack › Kustom.

What happens when

MomentWhat BunStack does
The customer opens the checkoutCreates a session at Kustom with lines, VAT, discount and shipping. Embeds the widget.
The customer clicks buyKustom 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 pageCreates the order as paid and sends the order confirmation.
About 2 minutes laterReceives Kustom's push. When the order already exists nothing happens. Otherwise the push creates the order.
Every 15 minutesReads back sessions that got neither a confirmation nor a push. Completed ones become orders. BunStack flags sessions it could not ask Kustom about.
Fraud checkPuts Kustom's decision on the order when it arrives at the push address.
FulfilmentCaptures the shipped lines, and the shipping on the first capture. This happens after the booking and before BunStack marks the order as shipped.
Refund, cancelSends them to Kustom. Nothing changes in BunStack until Kustom answers OK.
Every day 06:15 UTCSends 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

WhereWhat you see
Stack › KustomERROR with the reason from the last check. Each environment shows its own status.
The orderBunStack refuses capture, refund and cancel when the order's environment is not connected. The message names the environment.
The checkoutThe 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 checkoutspromotion 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 emailAn 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.

ReasonMeansWhat to do
oversoldThe customer paid for more units than there were. The order is kept.Choose to ship, back-order or refund.
Amount or currency mismatchKustom's amount or currency differs from the session. BunStack creates the order anyway.Compare the order with Kustom's portal before you ship.
Country mismatchThe address from Kustom is in another country than the one VAT was calculated for.Check the VAT before you ship.
fraud pendingKustom's fraud check is running. Capture is blocked.Wait until Kustom accepts the order.
fraud rejectedKustom rejected the order in its fraud check.Do not ship. Cancel the order.
Kustom cancelledKustom 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.

See also