# How to configure checkout (https://developer.godaddy.com/en/docs/api-users/commerce/accept-payments/online-payments/configure)

---
title: How to configure checkout
description: >-
  Choose the payment methods Unified Checkout offers, what it collects from the
  shopper, and the shipping, pickup, tax, promotion, and tip options it offers.
keywords: >-
  configure checkout, paymentMethods, checkoutTypes, express checkout, Apple
  Pay, Google Pay, enableShipping, enableLocalPickup, enableTaxCollection,
  enableTips, pickup locations, operatingHours
agentNotes:
  permissions:
    - GoDaddy Payments account on the business that owns the store
  scopes:
    - 'commerce.checkout-session:write'
  idempotent: false
  destructive: false
  failureRecovery: >-
    Collect options work the moment you set them. Offer options fail when the
    shopper reaches them, not at session create: TAX_CALCULATION_ERROR means the
    store has no tax rates, and "No shipping methods found" means no shipping
    rate covers the destination. Turn the flag off or configure the store, then
    create a new session.
related:
  guides:
    - title: How to create a checkout session
      href: /docs/api-users/commerce/accept-payments/online-payments/create-session
    - title: How to set up Apple Pay
      href: /docs/api-users/commerce/accept-payments/online-payments/apple-pay
    - title: How to configure your taxes
      href: /docs/api-users/commerce/configure-taxes
    - title: How to render embedded checkout
      href: /docs/api-users/commerce/accept-payments/online-payments/embedded
  concepts:
    - title: About online payments
      href: /docs/api-users/commerce/accept-payments/online-payments
    - title: Checkout session reference
      href: /docs/api-users/commerce/accept-payments/online-payments/session-fields
pageId: 68d692f6-b727-4c86-a7d1-bc9fb29d6d27
---

## Overview

Every checkout option is a field on the session input, alongside the order and the return URLs. Options split into three kinds: the payment methods checkout offers, what the form collects from the shopper, and what the form offers them.

Collect options work the moment you set them. Offer options need something more (either configuration on the store or extra fields on the session) and fail once a shopper reaches them rather than when you create the session. Start with collect options, take a payment end to end, then add offer options as the store becomes ready.

This page covers each option. Go to [How to create a checkout session](https://developer.godaddy.com/docs/api-users/commerce/accept-payments/online-payments/create-session) for where the session input comes from.

## Choose payment methods

* Name each method you want to offer and the processor behind it:

  ```typescript
  {
    paymentMethods: {
      card: { processor: 'godaddy', checkoutTypes: ['standard'] },
      applePay: { processor: 'godaddy', checkoutTypes: ['express'] },
      googlePay: { processor: 'godaddy', checkoutTypes: ['express'] },
    },
  }
  ```

`checkoutTypes` accepts `standard`, `express`, or both.

The `express-checkout` section renders when a payment method offers `express`, `enableShipping` is set, and the order total is greater than 0.

Apple Pay requires the business's domain to be registered before it can be offered. Go to [How to set up Apple Pay](https://developer.godaddy.com/docs/api-users/commerce/accept-payments/online-payments/apple-pay) for domain registration.

## What checkout collects

Each option is a boolean on the session. Enable only what your business needs.

The following table lists the options that change what the form collects from the shopper. None of these need anything configured on the store:

| Option                            | Effect                                 |
| --------------------------------- | -------------------------------------- |
| `enablePhoneCollection`           | Collect a phone number                 |
| `enableNotesCollection`           | Accept an order note                   |
| `enableShippingAddressCollection` | Collect a shipping address             |
| `enableBillingAddressCollection`  | Collect a billing address              |
| `enableAddressAutocomplete`       | Suggest addresses as the shopper types |

## What checkout offers

The following table lists the options that change what the form offers rather than what it collects, and what each one needs configured on the store:

| Option                 | Effect                                | Also needs                                                                                                           |
| ---------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `enableShipping`       | Collect a shipping method             | Shipping rates on the store that cover the shopper's destination. Checkout reads them, it doesn't create them        |
| `enableLocalPickup`    | Offer pickup at a location you define | `locations` on the session, and `operatingHours` for pickup times. No store setup                                    |
| `enableTaxCollection`  | Calculate tax on the order            | Tax rates on the store. Go to [How to configure your taxes](https://developer.godaddy.com/docs/api-users/commerce/configure-taxes) to set them up |
| `enablePromotionCodes` | Accept a discount code                | Nothing                                                                                                              |
| `enableTips`           | Offer a tip                           | Nothing                                                                                                              |

Setting a flag without what it needs still renders the section, so supply whatever the **Also needs** column lists before you turn that flag on.

Turn on `enableTaxCollection` only after tax rates exist on the store. Without them, tax calculation returns `TAX_CALCULATION_ERROR` after the shopper enters an address. Go to [Create and apply taxes](https://www.godaddy.com/help/create-and-apply-taxes-40780) to set up tax in the GoDaddy interface.

Turn on `enableShipping` only after shipping rates cover the shopper's destination. Without them, checkout shows "No shipping methods found" and the shopper can't choose a method.

Pickup renders with nothing to select until you supply `locations`.

Embedded checkout reserves a row for `tips` when you list it in `layout`, even with `enableTips` unset. Go to [How to render embedded checkout](https://developer.godaddy.com/docs/api-users/commerce/accept-payments/online-payments/embedded#render-checkout) for section ordering.

The flags sit on the same session input as the order and the payment methods. A store that ships physical goods and charges tax sets these four:

```typescript
{
  enableShipping: true,
  enableShippingAddressCollection: true,
  enableTaxCollection: true,
  enablePhoneCollection: true,
}
```

Set `enableShipping` and `enableShippingAddressCollection` together. A session that omits them comes back with `enableShipping` already true and `enableShippingAddressCollection` unset, which renders a shipping section that asks for an address it never collects. Send both explicitly, including when you want shipping off.

## Pickup locations and hours

`enableLocalPickup` on its own doesn't tell checkout where a shopper collects an order. Supply `locations` for the places, and `operatingHours` for when they're open.

```typescript
{
  enableLocalPickup: true,
  locations: [
    {
      id: 'main-store',
      isDefault: true,
      address: {
        addressLine1: '100 Main St',
        adminArea3: 'Scottsdale',
        adminArea1: 'AZ',
        postalCode: '85251',
        countryCode: 'US',
      },
    },
  ],
  operatingHours: {
    default: {
      timeZone: 'America/Phoenix',
      leadTime: 60,
      pickupWindowInDays: 7,
      hours: {
        monday: { enabled: true, openTime: '09:00', closeTime: '17:00' },
        tuesday: { enabled: true, openTime: '09:00', closeTime: '17:00' },
        wednesday: { enabled: true, openTime: '09:00', closeTime: '17:00' },
        thursday: { enabled: true, openTime: '09:00', closeTime: '17:00' },
        friday: { enabled: true, openTime: '09:00', closeTime: '17:00' },
        saturday: { enabled: false, openTime: null, closeTime: null },
        sunday: { enabled: false, openTime: null, closeTime: null },
      },
    },
  },
}
```

Each location needs an `id`, an `isDefault`, and an `address` object, though every field inside `address` is optional. When you pass several locations, checkout picks the first one marked `isDefault`, and falls back to the first in the array if none is marked.

`operatingHours.default` needs `timeZone`, `leadTime` in minutes, `pickupWindowInDays` for how far ahead a shopper can book, and `hours`. Two further options change how slots are offered: `pickupMode` accepts `asap`, `dateAndTime`, or `dateOnly`, and `pickupSlotInterval` sets the gap between bookable slots.

Checkout expects every key in `hours`, even where the value is disabled.

## Set the checkout language

Set `enabledLocales` on the session for the languages checkout offers:

```typescript
{
  enabledLocales: ['en-US', 'es-ES'],
}
```

Checkout renders in `en-US` unless you change it. A session takes `enabledLocales` for the languages it allows, and embedded checkout sets the active one with the provider's `locale` prop.
