Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c4c5f02
add button cursor-pointer
cshing-godaddy Jul 1, 2026
1785322
improve tip btn styling, fix custom tip input
cshing-godaddy Jul 1, 2026
949b03c
enable tips in nextjs example
cshing-godaddy Jul 1, 2026
cfed7a4
fix tipPercentage schema
cshing-godaddy Jul 1, 2026
0d559e5
pass tipAmount in confirmCheckout
cshing-godaddy Jul 1, 2026
ac650af
add tipAmount definition
cshing-godaddy Jul 1, 2026
813e2a3
formatting
cshing-godaddy Jul 1, 2026
3878b05
add tests
cshing-godaddy Jul 1, 2026
d1d3bb3
changeset
cshing-godaddy Jul 1, 2026
b229861
Merge remote-tracking branch 'upstream/main'
cshing-godaddy Jul 6, 2026
5f148d9
Merge branch 'main' into main
pbennett1-godaddy Jul 8, 2026
9f4fc31
calculate tips from subtotal instead of total
cshing-godaddy Jul 9, 2026
112c161
add tips definition
cshing-godaddy Jul 9, 2026
8197e34
handle tip amounts
cshing-godaddy Jul 9, 2026
2eb2f64
fix tip amount selection
cshing-godaddy Jul 9, 2026
0e5649f
lint
cshing-godaddy Jul 10, 2026
8962669
handle tip thresholds
cshing-godaddy Jul 10, 2026
6afe9d4
regenerate from schema
cshing-godaddy Jul 10, 2026
c74a86b
renegerate checkout-env for MutationAuthorizeCheckoutSessionInput.tip…
cshing-godaddy Jul 10, 2026
db41364
revert add tipAmount
cshing-godaddy Jul 10, 2026
6db8aff
add tipAmount to provider payment request total
cshing-godaddy Jul 10, 2026
773b1b8
lint
cshing-godaddy Jul 10, 2026
72ac855
check session.enableTips before adding tipAmount
cshing-godaddy Jul 10, 2026
daac42e
update tests
cshing-godaddy Jul 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fruity-dots-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@godaddy/react": patch
---

Support tips in unified checkout
13 changes: 13 additions & 0 deletions examples/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ export default async function Home() {
enableTaxCollection: true,
enableNotesCollection: true,
enablePromotionCodes: true,
enableTips: true,
tips: {
default: {
percentages: [ 20, 40, 60 ]
},
thresholds: [
{
minSubtotal: 0,
maxSubtotal: 1000,
amounts: [ 300, 500, 700 ]
}
]
},
shipping: {
fulfillmentLocationId: 'default-location',
originAddress: {
Expand Down
38 changes: 38 additions & 0 deletions packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The first parameter accepts all checkout session configuration options from the
- **`enableSurcharge`** (boolean): Enable surcharge fees
- **`enableTaxCollection`** (boolean): Enable tax collection
- **`enableTips`** (boolean): Enable tip/gratuity options
- **`tips`** (CheckoutSessionTipsInput): Tip option configuration (see [Tips](#tips))
- **`enabledLocales`** ([String!]): List of enabled locales
- **`enabledPaymentProviders`** ([String!]): List of enabled payment providers
- **`environment`** (enum): Environment - `ote`, `prod`
Expand Down Expand Up @@ -135,6 +136,43 @@ operatingHours: {
- **Timezone handling** — All date/time logic uses the store's `timeZone`, not the customer's browser timezone. A store in Phoenix shows Phoenix hours regardless of where the customer is browsing from.
- **No available slots** — In `dateAndTime` mode, when leadTime exceeds the entire pickup window, no days are enabled, or no selectable slots exist, a "No available time slots" banner is shown.

### Tips

The `tips` field configures preset tip options shown to the customer when `enableTips` is `true`. Tips supports a `default` preset and optional `thresholds` that activate based on the order subtotal. Only one of `amounts` or `percentages` should be provided — not both.

```typescript
tips: {
default: {
percentages: [15, 18, 20],
},
thresholds: [
{
minSubtotal: 0,
maxSubtotal: 1000,
amounts: [100, 200, 500],
},
],
}
```

#### `tips.default`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `amounts` | number[] | No | Fixed tip amounts in the smallest currency unit (e.g. cents). |
| `percentages` | number[] | No | Tip percentage options (integers between 0 and 100). |

#### `tips.thresholds`

An array of threshold objects that override the default tips when the order subtotal falls within the specified range.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `minSubtotal` | number | No | Minimum order subtotal (inclusive) in the smallest currency unit for this threshold to apply. |
| `maxSubtotal` | number | No | Maximum order subtotal (exclusive) in the smallest currency unit for this threshold to apply. |
| `amounts` | number[] | No | Fixed tip amounts in the smallest currency unit (e.g. cents). |
| `percentages` | number[] | No | Tip percentage options (integers between 0 and 100). |

### Appearance

The `appearance` field customizes the checkout's look and feel.
Expand Down
Loading