From 23771d61cd1fa9d952e8911e9d046c0224e0e77e Mon Sep 17 00:00:00 2001 From: Wender Lima Date: Thu, 6 Aug 2026 11:59:37 -0400 Subject: [PATCH] [B2BTEAM-3748] Accept priceToken on ItemInput Pricing Fallback V2: let storefronts send the signed price returned by the search along with the item, so the checkout REST API can close the cart with that price while the Pricing system is unavailable. The field is optional and needs no resolver change: `addToCart` strips only `options`, `index` and `uniqueId` before calling `checkout.addItem`, and `updateItems` strips only `id`, so `priceToken` already reaches `PATCH /orderForm/{id}/items` through the rest spread - and `PATCH .../items` already supports it. When the storefront does not send the field, the payload reaching checkout is byte-for-byte the same as before. Co-Authored-By: Claude Opus 5 --- CHANGELOG.md | 4 ++++ graphql/types/Item.graphql | 7 +++++++ node/typings/global.d.ts | 1 + 3 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8170fc..37e8b8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Optional `priceToken` on `ItemInput` (Pricing Fallback V2), forwarded as-is to the checkout REST API on `addToCart` and `updateItems`, so storefronts can send the signed price returned by the search and the cart can be closed while the Pricing system is unavailable. + ## [0.68.0] - 2026-06-12 ### Fixed diff --git a/graphql/types/Item.graphql b/graphql/types/Item.graphql index 4ee8ba5..7855b4a 100644 --- a/graphql/types/Item.graphql +++ b/graphql/types/Item.graphql @@ -158,6 +158,13 @@ input ItemInput { uniqueId: String inputValues: InputValues options: [AssemblyOptionInput] + """ + Signed price (Pricing Fallback) returned by the search for this SKU and + seller, forwarded as-is to the checkout REST API so it can close the cart + with that price while the Pricing system is unavailable. Optional: when it + is absent the payload reaches checkout exactly as before. + """ + priceToken: String } input AssemblyOptionInput { diff --git a/node/typings/global.d.ts b/node/typings/global.d.ts index 2dea1df..9421363 100644 --- a/node/typings/global.d.ts +++ b/node/typings/global.d.ts @@ -466,6 +466,7 @@ declare global { seller?: string uniqueId?: string options?: AssemblyOptionInput[] + priceToken?: string } interface AssemblyOptionInput {