diff --git a/.changeset/cash-rounding-transaction-complete.md b/.changeset/cash-rounding-transaction-complete.md new file mode 100644 index 0000000000..25a308c722 --- /dev/null +++ b/.changeset/cash-rounding-transaction-complete.md @@ -0,0 +1,5 @@ +--- +'@shopify/ui-extensions': patch +--- + +Add optional `cashRoundingAdjustment` money data to POS transaction-complete payload types. diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/events/transaction-complete-event.ts b/packages/ui-extensions/src/surfaces/point-of-sale/events/transaction-complete-event.ts index 25d17de671..aa0e3b7ea4 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/events/transaction-complete-event.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/events/transaction-complete-event.ts @@ -61,6 +61,10 @@ interface BaseTransactionCompleteEvent extends Event { * The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction. */ readonly tipAmount?: Money; + /** + * The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied. + */ + readonly cashRoundingAdjustment?: Money; } /** diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/types/base-transaction-complete.ts b/packages/ui-extensions/src/surfaces/point-of-sale/types/base-transaction-complete.ts index 0e03cac569..66d08358c4 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/types/base-transaction-complete.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/types/base-transaction-complete.ts @@ -62,4 +62,8 @@ export interface BaseTransactionComplete { * The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction. */ tipAmount?: Money; + /** + * The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied. + */ + cashRoundingAdjustment?: Money; }