Update Transaction (Beta)

Updates an existing bundle transaction in place - when a customer edits their bundle in the cart (changing products, quantities, discount, box size, or selling plan) before purchase.

Previously you had to call Create transaction again for every edit and rewrite the cart line with a new txnId. With this endpoint you keep the same transactionId across edits and simply refresh the cart.

Auth: Storefront-callable (no token)

This API is only applicable before purchase is completed. A transaction that has been purchased - edit those with Update subscription bundle instead.

Example flow

  1. Customer adds a product → call Create transaction → gets transactionId.
  2. Call /cart/add.js (with _bundleId: transactionId) to open the cart.
  3. Customer edits the bundle in the cart.
  4. call Update transaction with the same transactionId.
  5. Call /cart/add.js again to reflect the updated cart. (The _bundleId already on the lines stays valid.

Body Params
string

This is the transactionId / txnId that needs to be updated

string
string

id

string

id

string

Pass null to add bundle as a one-time purchase

productVariants
array of objects
productVariants
int32
Defaults to 1
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json