NoteAPI
The API for interacting with the note applied to checkout.
Anchor to standardapiStandardApi
The base API object provided to purchase
extension targets.
- Anchor to notenoteSubscribableSignalLike<string | undefined>required
A note left by the customer to the merchant, either in their cart or during checkout.
SubscribableSignalLike
Represents a read-only value managed on the main thread that an extension can subscribe to. Example: Checkout uses this to manage the state of an object and communicate state changes to extensions running in a sandboxed web worker. This interface is compatible with [Preact's ReadonlySignal](https://github.com/preactjs/signals/blob/a023a132a81bd4ba4a0bebb8cbbeffbd8c8bbafc/packages/core/src/index.ts#L700-L709). Some fields are deprecated but still supported for backwards compatibility. In version 2025-10, [`StatefulRemoteSubscribable`](https://github.com/Shopify/remote-dom/blob/03929aa8418a89d41d294005f219837582718df8/packages/async-subscription/src/types.ts#L17) was replaced with `ReadonlySignalLike`. Checkout will remove the old fields some time in the future.
- current
T
- destroy
() => Promise<void>
- subscribe
(fn: (value: T) => void) => () => void
- value
T
export interface SubscribableSignalLike<T> extends ReadonlySignalLike<T> {
/**
* @deprecated Use `.value` instead.
*/
readonly current: T;
/**
* @deprecated No longer needed. Use Preact Signal management instead.
*/
destroy(): Promise<void>;
}
Anchor to useNoteuse Note()
Returns the proposed note
applied to the checkout.
Anchor to useNote-returnsReturns
Anchor to checkoutapiCheckoutApi
The API object provided to purchase.checkout
extension targets.
- Anchor to applyNoteChangeapplyNoteChange(change: NoteChange) => Promise<NoteChangeResult>required
Performs an update on the note attached to the cart and checkout. If successful, this mutation results in an update to the value retrieved through the
note
property.NoteThis method will return an error if the cart instruction
is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.
NoteChange
NoteRemoveChange | NoteUpdateChange
NoteRemoveChange
Removes a note
- type
The type of the `NoteRemoveChange` API.
'removeNote'
export interface NoteRemoveChange {
/**
* The type of the `NoteRemoveChange` API.
*/
type: 'removeNote';
}
NoteUpdateChange
An Update to a note on the order. for example, the buyer could request detailed packaging instructions in an order note
- note
The new value of the note.
string
- type
The type of the `NoteUpdateChange` API.
'updateNote'
export interface NoteUpdateChange {
/**
* The type of the `NoteUpdateChange` API.
*/
type: 'updateNote';
/**
* The new value of the note.
*/
note: string;
}
NoteChangeResult
NoteChangeResultSuccess | NoteChangeResultError
NoteChangeResultSuccess
- type
The type of the `NoteChangeResultSuccess` API.
'success'
export interface NoteChangeResultSuccess {
/**
* The type of the `NoteChangeResultSuccess` API.
*/
type: 'success';
}
NoteChangeResultError
- message
A message that explains the error. This message is useful for debugging. It is **not** localized, and therefore should not be presented directly to the buyer.
string
- type
The type of the `NoteChangeResultError` API.
'error'
export interface NoteChangeResultError {
/**
* The type of the `NoteChangeResultError` API.
*/
type: 'error';
/**
* A message that explains the error. This message is useful for debugging.
* It is **not** localized, and therefore should not be presented directly
* to the buyer.
*/
message: string;
}
Anchor to useApplyNoteChangeuse Apply Note Change()
Returns a function to mutate the note
property of the checkout.
NoteChange
NoteRemoveChange | NoteUpdateChange
NoteRemoveChange
Removes a note
- type
The type of the `NoteRemoveChange` API.
'removeNote'
export interface NoteRemoveChange {
/**
* The type of the `NoteRemoveChange` API.
*/
type: 'removeNote';
}
NoteUpdateChange
An Update to a note on the order. for example, the buyer could request detailed packaging instructions in an order note
- note
The new value of the note.
string
- type
The type of the `NoteUpdateChange` API.
'updateNote'
export interface NoteUpdateChange {
/**
* The type of the `NoteUpdateChange` API.
*/
type: 'updateNote';
/**
* The new value of the note.
*/
note: string;
}
NoteChangeResult
NoteChangeResultSuccess | NoteChangeResultError
NoteChangeResultSuccess
- type
The type of the `NoteChangeResultSuccess` API.
'success'
export interface NoteChangeResultSuccess {
/**
* The type of the `NoteChangeResultSuccess` API.
*/
type: 'success';
}
NoteChangeResultError
- message
A message that explains the error. This message is useful for debugging. It is **not** localized, and therefore should not be presented directly to the buyer.
string
- type
The type of the `NoteChangeResultError` API.
'error'
export interface NoteChangeResultError {
/**
* The type of the `NoteChangeResultError` API.
*/
type: 'error';
/**
* A message that explains the error. This message is useful for debugging.
* It is **not** localized, and therefore should not be presented directly
* to the buyer.
*/
message: string;
}