You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update JSDoc from latest checkout-web review changes
Re-apply full checkout-web diff with review feedback. Includes
{API_VERSION} placeholder URLs, updated descriptions, and Shopify
Function link fixes. All fully qualified URLs preserved. Preserves
2026-01-specific deprecated types with appropriate JSDoc.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* The identifier of the [selling plan](/docs/apps/build/purchase-options/subscriptions) to associate with this line item, such as a subscription or pre-order plan.
214
+
* The identifier of the [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions) to associate with this line item, such as a subscription or pre-order plan.
* The [selling plan](/docs/apps/build/purchase-options/subscriptions) to associate with this line item. Pass `null` to remove the item from its current selling plan.
277
+
* The [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions) to associate with this line item. Pass `null` to remove the item from its current selling plan.
/** Removes a cart [metafield](/docs/apps/build/custom-data/metafields). Pass this to `applyMetafieldChange()` to delete a metafield by key and namespace. */
448
+
/** Removes a cart [metafield](https://shopify.dev/docs/apps/build/custom-data/metafields). Pass this to `applyMetafieldChange()` to delete a metafield by key and namespace. */
449
449
exportinterfaceMetafieldRemoveCartChange{
450
450
/**
451
451
* Identifies this as a cart metafield removal. Set this when creating a change to delete an existing metafield by key and namespace.
* Creates or updates a cart [metafield](/docs/apps/build/custom-data/metafields). Pass this to `applyMetafieldChange()` to set a metafield value. If a metafield with the provided key and namespace doesn’t already exist, then it gets created.
495
+
* Creates or updates a cart [metafield](https://shopify.dev/docs/apps/build/custom-data/metafields). Pass this to `applyMetafieldChange()` to set a metafield value. If a metafield with the provided key and namespace doesn’t already exist, then it gets created.
* See the [metafield types documentation](/docs/apps/build/custom-data/metafields/list-of-data-types) for a list of supported types.
518
+
* See the [metafield types documentation](https://shopify.dev/docs/apps/build/custom-data/metafields/list-of-data-types) for a list of supported types.
* The input for `applyMetafieldChange()`. Use the `type` property to specify the operation.
526
526
*
527
-
* - `MetafieldRemoveCartChange` (`type: 'removeCartMetafield'`): Removes an existing cart [metafield](/docs/apps/build/custom-data/metafields).
528
-
* - `MetafieldUpdateCartChange` (`type: 'updateCartMetafield'`): Creates or updates a cart metafield.
527
+
* - `MetafieldRemoveCartChange` (`type: ‘removeCartMetafield’`): Removes an existing cart [metafield](https://shopify.dev/docs/apps/build/custom-data/metafields).
528
+
* - `MetafieldUpdateCartChange` (`type: ‘updateCartMetafield’`): Creates or updates a cart metafield.
529
+
* - `MetafieldRemoveChange` (`type: ‘removeMetafield’`) - Deprecated. Use `MetafieldRemoveCartChange` instead.
530
+
* - `MetafieldUpdateChange` (`type: ‘updateMetafield’`) - Deprecated. Use `MetafieldUpdateCartChange` instead.
529
531
*/
530
532
exporttypeMetafieldChange=
531
533
|MetafieldRemoveChange
@@ -534,27 +536,27 @@ export type MetafieldChange =
534
536
|MetafieldUpdateCartChange;
535
537
536
538
/**
537
-
* The result of a successful metafield change. The `type` property is `'success'`.
539
+
* The result of a successful metafield change. The `type` property is `’success’`.
538
540
*/
539
541
exportinterfaceMetafieldChangeResultSuccess{
540
542
/**
541
543
* Indicates that the metafield change was applied successfully.
542
544
*/
543
-
type: 'success';
545
+
type: ‘success’;
544
546
}
545
547
546
548
/**
547
549
* The result of a failed metafield change. Check the `message` property for details about what went wrong.
548
550
*/
549
551
exportinterfaceMetafieldChangeResultError{
550
552
/**
551
-
* Indicates that the metafield change couldn't be applied. Check the `message` property for details.
553
+
* Indicates that the metafield change couldn’t be applied. Check the `message` property for details.
552
554
*/
553
-
type: 'error';
555
+
type: ‘error’;
554
556
555
557
/**
556
558
* A message that explains the error. This message is useful for debugging.
557
-
* It isn't localized and shouldn't be displayed to the buyer.
559
+
* It isn’t localized and shouldn’t be displayed to the buyer.
558
560
*/
559
561
message: string;
560
562
}
@@ -567,35 +569,35 @@ export type MetafieldChangeResult =
567
569
|MetafieldChangeResultError;
568
570
569
571
/**
570
-
* Updates the buyer's shipping address on the checkout. Pass this to `applyShippingAddressChange()` to modify specific address fields without replacing the entire address.
572
+
* Updates the buyer’s shipping address on the checkout. Pass this to `applyShippingAddressChange()` to modify specific address fields without replacing the entire address.
571
573
*/
572
574
exportinterfaceShippingAddressUpdateChange{
573
575
/**
574
576
* Identifies this as a shipping address update. This is the only supported change type for `applyShippingAddressChange()`.
575
577
*/
576
-
type: 'updateShippingAddress';
578
+
type: ‘updateShippingAddress’;
577
579
578
580
/**
579
581
* Fields to update in the shipping address. You only need to provide
580
-
* values for the fields you want to update. Any fields you don't list
582
+
* values for the fields you want to update. Any fields you don’t list
581
583
* keep their current values.
582
584
*/
583
585
address: Partial<ShippingAddress>;
584
586
}
585
587
586
588
/**
587
-
* The input for `applyShippingAddressChange()`. Currently only supports `ShippingAddressUpdateChange` (with `type: 'updateShippingAddress'`).
589
+
* The input for `applyShippingAddressChange()`. Currently only supports `ShippingAddressUpdateChange` (with `type: ‘updateShippingAddress’`).
* The `MailingAddress` field that caused the error, such as `'countryCode'` or `'zip'`. The value is `undefined` if the error isn't specific to a single field.
614
+
* The `MailingAddress` field that caused the error, such as `’countryCode’` or `’zip’`. The value is `undefined` if the error isn’t specific to a single field.
613
615
*/
614
616
field?: keyofMailingAddress;
615
617
616
618
/**
617
619
* A message that explains the error. This message is useful for debugging.
618
-
* It isn't localized and shouldn't be displayed to the buyer.
620
+
* It isn’t localized and shouldn’t be displayed to the buyer.
* Indicates that the shipping address change couldn't be applied. Check the `errors` array for field-level details.
630
+
* Indicates that the shipping address change couldn’t be applied. Check the `errors` array for field-level details.
629
631
*/
630
-
type: 'error';
632
+
type: ‘error’;
631
633
632
634
/**
633
635
* The list of field-level errors that prevented the address change. Each entry identifies which address field failed and why.
@@ -648,61 +650,61 @@ export type ShippingAddressChangeResult =
648
650
exportinterfaceCheckoutApi{
649
651
/**
650
652
* Updates or removes an attribute on the cart and checkout. On success, the
651
-
* [`attributes`](/docs/api/checkout-ui-extensions/apis/attributes#standardapi-propertydetail-attributes) property updates to reflect the change.
653
+
* [`attributes`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/attributes#standardapi-propertydetail-attributes) property updates to reflect the change.
652
654
*
653
-
* > Note: This method returns an error if the [cart instruction](/docs/api/checkout-ui-extensions/apis/cart-instructions#standardapi-propertydetail-instructions) `attributes.canUpdateAttributes` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
655
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#standardapi-propertydetail-instructions) `attributes.canUpdateAttributes` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
* Adds, removes, or updates line items in the cart. The returned promise resolves when the change has been applied by the server, and the [`lines`](/docs/api/checkout-ui-extensions/apis/cart-lines#standardapi-propertydetail-lines) property updates with the new state.
662
+
* Adds, removes, or updates line items in the cart. The returned promise resolves when the change has been applied by the server, and the [`lines`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-lines#standardapi-propertydetail-lines) property updates with the new state.
661
663
*
662
-
* > Note: This method returns an error if the [cart instruction](/docs/api/checkout-ui-extensions/apis/cart-instructions#standardapi-propertydetail-instructions) `lines.canAddCartLine` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
664
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#standardapi-propertydetail-instructions) `lines.canAddCartLine` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
* Adds or removes a discount code on the checkout. The returned promise resolves when the change has been applied by the server, and the [`discountCodes`](/docs/api/checkout-ui-extensions/apis/discounts#standardapi-propertydetail-discountcodes) property updates with the new state.
669
+
* Adds or removes a discount code on the checkout. The returned promise resolves when the change has been applied by the server, and the [`discountCodes`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/discounts#standardapi-propertydetail-discountcodes) property updates with the new state.
668
670
*
669
671
* > Caution:
670
-
* > See [security considerations](/docs/api/checkout-ui-extensions/configuration#network-access) if your extension retrieves discount codes through a network call.
672
+
* > See [security considerations](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#network-access) if your extension retrieves discount codes through a network call.
671
673
*
672
-
* > Note: This method returns an error if the [cart instruction](/docs/api/checkout-ui-extensions/apis/cart-instructions#standardapi-propertydetail-instructions) `discounts.canUpdateDiscountCodes` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
674
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#standardapi-propertydetail-instructions) `discounts.canUpdateDiscountCodes` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
673
675
*/
674
676
applyDiscountCodeChange(
675
677
change: DiscountCodeChange,
676
678
): Promise<DiscountCodeChangeResult>;
677
679
678
680
/**
679
-
* Adds or removes a gift card from the checkout. The returned promise resolves when the change has been applied by the server, and the [`appliedGiftCards`](/docs/api/checkout-ui-extensions/apis/gift-cards#standardapi-propertydetail-appliedgiftcards) property updates with the new state.
681
+
* Adds or removes a gift card from the checkout. The returned promise resolves when the change has been applied by the server, and the [`appliedGiftCards`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/gift-cards#standardapi-propertydetail-appliedgiftcards) property updates with the new state.
680
682
*
681
683
* > Caution:
682
-
* > See [security considerations](/docs/api/checkout-ui-extensions/configuration#network-access) if your extension retrieves gift card codes through a network call.
684
+
* > See [security considerations](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/configuration#network-access) if your extension retrieves gift card codes through a network call.
683
685
*
684
686
* > Note: This method returns an error if the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
* Creates, updates, or removes a cart metafield on the checkout. On success, the
690
-
* [`metafields`](/docs/api/checkout-ui-extensions/apis/metafields#standardapi-propertydetail-metafields) property updates to reflect the change.
692
+
* [`metafields`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/metafields#standardapi-propertydetail-metafields) property updates to reflect the change.
691
693
*
692
-
* Cart metafields are copied to order metafields at order creation time if there’s a matching order metafield definition with the [`cart to order copyable`](/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled.
694
+
* Cart metafields are copied to order metafields at order creation time if there’s a matching order metafield definition with the [`cart to order copyable`](https://shopify.dev/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled.
693
695
*
694
696
* > Caution: `MetafieldRemoveChange` and `MetafieldUpdateChange` are deprecated. Use cart metafields with `MetafieldRemoveCartChange` and `MetafieldUpdateCartChange` instead. If `MetafieldUpdateChange` writes a metafield with the same namespace and key as a cart metafield that’s configured to copy, the cart metafield won’t be copied.
695
697
*
696
-
* > Note: This method returns an error if the [cart instruction](/docs/api/checkout-ui-extensions/apis/cart-instructions#standardapi-propertydetail-instructions) `metafields.canSetCartMetafields` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
698
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#standardapi-propertydetail-instructions) `metafields.canSetCartMetafields` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
* > Note: This method returns an error if the [cart instruction](/docs/api/checkout-ui-extensions/apis/cart-instructions#standardapi-propertydetail-instructions) `notes.canUpdateNote` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
707
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#standardapi-propertydetail-instructions) `notes.canUpdateNote` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
* are merged into the existing address without prompting the buyer. On success,
717
719
* the `shippingAddress` property updates to reflect the change.
718
720
*
719
-
* > Note: This method returns an error if the [cart instruction](/docs/api/checkout-ui-extensions/apis/cart-instructions#standardapi-propertydetail-instructions) `delivery.canSelectCustomAddress` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
721
+
* > Note: This method returns an error if the [cart instruction](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/cart-instructions#standardapi-propertydetail-instructions) `delivery.canSelectCustomAddress` is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
720
722
*
721
-
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
723
+
* {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).
0 commit comments