@shopify/ui-extensions 2026.10.1 → 2026.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ts/surfaces/point-of-sale/events/transaction-complete-event.d.ts +3 -3
- package/build/ts/surfaces/point-of-sale/types/base-transaction-complete.d.ts +3 -3
- package/build/ts/surfaces/point-of-sale/types/payment.d.ts +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/surfaces/point-of-sale/events/transaction-complete-event.ts +3 -3
- package/src/surfaces/point-of-sale/types/base-transaction-complete.ts +3 -3
- package/src/surfaces/point-of-sale/types/payment.ts +1 -1
|
@@ -45,11 +45,11 @@ interface BaseTransactionCompleteEvent {
|
|
|
45
45
|
*/
|
|
46
46
|
readonly grandTotal: Money;
|
|
47
47
|
/**
|
|
48
|
-
* An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount
|
|
48
|
+
* An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount, and currency. For cash payments on sales, the amount is the cash the customer handed over, so it can exceed the amount owed. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal` plus any `cashRoundingAdjustment`.
|
|
49
49
|
*/
|
|
50
50
|
readonly paymentMethods: Payment[];
|
|
51
51
|
/**
|
|
52
|
-
* The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts.
|
|
52
|
+
* The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: `grandTotal` plus any `cashRoundingAdjustment`, minus the sum of all payment amounts. In a split payment where an earlier cash payment already gave change, a balance that is still unpaid is reported as a positive amount without subtracting that change.
|
|
53
53
|
*/
|
|
54
54
|
readonly balanceDue: Money;
|
|
55
55
|
/**
|
|
@@ -69,7 +69,7 @@ interface BaseTransactionCompleteEvent {
|
|
|
69
69
|
*/
|
|
70
70
|
readonly tipAmount?: Money;
|
|
71
71
|
/**
|
|
72
|
-
* The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.
|
|
72
|
+
* The cash rounding adjustment applied to this transaction as a `Money` object. Positive when the cash total was rounded up and negative when it was rounded down. Returns `undefined` when no cash rounding adjustment was applied.
|
|
73
73
|
*/
|
|
74
74
|
readonly cashRoundingAdjustment?: Money;
|
|
75
75
|
}
|
|
@@ -47,11 +47,11 @@ export interface BaseTransactionComplete {
|
|
|
47
47
|
*/
|
|
48
48
|
grandTotal: Money;
|
|
49
49
|
/**
|
|
50
|
-
* An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount
|
|
50
|
+
* An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount, and currency. For cash payments on sales, the amount is the cash the customer handed over, so it can exceed the amount owed. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal` plus any `cashRoundingAdjustment`.
|
|
51
51
|
*/
|
|
52
52
|
paymentMethods: Payment[];
|
|
53
53
|
/**
|
|
54
|
-
* The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: "USD"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts.
|
|
54
|
+
* The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: "USD"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: `grandTotal` plus any `cashRoundingAdjustment`, minus the sum of all payment amounts. In a split payment where an earlier cash payment already gave change, a balance that is still unpaid is reported as a positive amount without subtracting that change.
|
|
55
55
|
*/
|
|
56
56
|
balanceDue: Money;
|
|
57
57
|
/**
|
|
@@ -71,7 +71,7 @@ export interface BaseTransactionComplete {
|
|
|
71
71
|
*/
|
|
72
72
|
tipAmount?: Money;
|
|
73
73
|
/**
|
|
74
|
-
* The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.
|
|
74
|
+
* The cash rounding adjustment applied to this transaction as a `Money` object. Positive when the cash total was rounded up and negative when it was rounded down. Returns `undefined` when no cash rounding adjustment was applied.
|
|
75
75
|
*/
|
|
76
76
|
cashRoundingAdjustment?: Money;
|
|
77
77
|
}
|
|
@@ -9,7 +9,7 @@ export type PaymentMethod = 'Cash' | 'Custom' | 'CreditCard' | 'CardPresentRefun
|
|
|
9
9
|
*/
|
|
10
10
|
export interface Payment {
|
|
11
11
|
/**
|
|
12
|
-
* The payment amount.
|
|
12
|
+
* The payment amount. For cash payments on `Sale` transactions in POS 11.16.0 and later, this is the cash the customer handed over, including any change given back. For other payment methods, other transaction types, and cash in earlier POS versions, it's the amount recorded on the payment transaction.
|
|
13
13
|
*/
|
|
14
14
|
amount: number;
|
|
15
15
|
/**
|