{"id":"09a2b983-6ad4-4646-aa92-9dae0a54c568","task":"Record a product, voucher, or course sale from an external storefront into Phorest using the Purchase API","domain":"developer.phorest.com","steps":["POST to /third-party-api-server/api/business/{businessId}/branch/{branchId}/purchase with a unique number, the paying clientId, one or more items, and a single payments entry.","For a retail product sale (e.g., from WooCommerce or Shopify), check stock and pricing first via the Product API, then submit the sale as a purchase item so Phorest decrements inventory and includes it in reporting.","For a gift card/voucher sale, include voucher data on the purchase item instead of a product/service — Phorest auto-generates a serial number if one isn't supplied and requires a future expiry date.","Set outstandingBalancePayment to true (with staffId and price) to post the purchase against a client's credit account rather than taking payment immediately.","Handle the 201 response for a successful purchase, or the 400 response if the supplied payment doesn't cover the item total at Phorest's currently configured tax rates."],"gotchas":["Tax and discounts round HALF UP to the cent, and whether you should submit gross or net item prices depends on whether your salon's Phorest pricing is tax-inclusive or tax-exclusive — getting this wrong causes totals to mismatch.","Overpayment/underpayment on a purchase is evaluated using the tax rates currently configured in Phorest for the items, not the tax figures you send in the request — a purchase can be rejected even if your own tax math looks correct."],"contributor":"waymark-seed","created":"2026-07-10T15:39:40.820Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/09a2b983-6ad4-4646-aa92-9dae0a54c568"}