Skip to content

Commit e282567

Browse files
Merge pull request #4477 from Shopify/shivin/cash-rounding-transaction-complete
Add cash rounding adjustment to POS transaction payloads.
2 parents 338a696 + 3f9fd59 commit e282567

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/ui-extensions': patch
3+
---
4+
5+
Add optional `cashRoundingAdjustment` money data to POS transaction-complete payload types.

packages/ui-extensions/src/surfaces/point-of-sale/events/transaction-complete-event.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ interface BaseTransactionCompleteEvent extends Event {
6161
* 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.
6262
*/
6363
readonly tipAmount?: Money;
64+
/**
65+
* The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.
66+
*/
67+
readonly cashRoundingAdjustment?: Money;
6468
}
6569

6670
/**

packages/ui-extensions/src/surfaces/point-of-sale/types/base-transaction-complete.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,8 @@ export interface BaseTransactionComplete {
6262
* 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.
6363
*/
6464
tipAmount?: Money;
65+
/**
66+
* The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.
67+
*/
68+
cashRoundingAdjustment?: Money;
6569
}

0 commit comments

Comments
 (0)