| Symptom | Likely cause | Fix |
|---|---|---|
| Setup fails with 401 | Wrong shared secret, wrong credential matched, test/prod mix-up | Log which credential you matched (not the secret); check deploymentMode |
| Setup fails with 500 | Unhandled data (missing extrinsic, unknown ship-to) | Treat optional data as optional; return a clear 4xx status for bad input |
| Buyer sees a blank page | StartPage URL blocked in a frame, or cookies rejected | Set frame-ancestors for the buyer's domain; cookies SameSite=None; Secure |
| User lands logged out | Session token not consumed, or a redirect drops it | Make the StartPage URL create the session, then redirect |
| Cart never arrives | Form posts to the wrong URL, or the BrowserFormPost URL was not stored | Post to the stored URL; check for typos and encoding |
| Cart arrives but is rejected | Invalid XML, wrong DTD version, missing required element | Validate the PunchOutOrderMessage before posting |
| "BuyerCookie mismatch" | Cookie not echoed exactly | Echo it byte for byte |
| Cart opens inside the catalog window | Form target wrong | Use the target the buyer expects (OCI: ~TARGET, usually _top) |
| "Unit of measure not found" | Unmapped unit code | Map to UN/CEFACT (cXML) or the buyer's SAP units (OCI). See units |
| Totals or prices wrong | Price unit, pack size or rounding | Align price basis; two decimals |
| Strange characters in descriptions | Encoding mismatch | UTF-8 everywhere; escape XML; URL-encode form values correctly |
| Wrong approver or GL account | Missing or generic classification | Accurate UNSPSC per line |
| Edit opens an empty cart | ItemOut not read, auxiliary IDs not stable | Rebuild from ItemOut; see edit and inspect |
| OCI cart empty in SAP | HOOK_URL missing or changed, field names wrong | Use the HOOK_URL from the login; check NEW_ITEM-...[n] names |
| PO does not match cart | Price changed, lines split | Store cart price with auxiliary ID; agree price-change policy |
Gather evidence first
For every failed session, keep the incoming request (with secrets removed), your response, the cart you posted, timestamps and the user's browser. Nine times out of ten the cause is visible in those four files.