GoDaddy

How to configure checkout

View as Markdown

Choose the payment methods Unified Checkout offers, what it collects from the shopper, and the shipping, pickup, tax, promotion, and tip options it offers.

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 for where the session input comes from.

Choose payment methods

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

    {
      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 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:

OptionEffect
enablePhoneCollectionCollect a phone number
enableNotesCollectionAccept an order note
enableShippingAddressCollectionCollect a shipping address
enableBillingAddressCollectionCollect a billing address
enableAddressAutocompleteSuggest 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:

OptionEffectAlso needs
enableShippingCollect a shipping methodShipping rates on the store that cover the shopper's destination. Checkout reads them, it doesn't create them
enableLocalPickupOffer pickup at a location you definelocations on the session, and operatingHours for pickup times. No store setup
enableTaxCollectionCalculate tax on the orderTax rates on the store. Go to How to configure your taxes to set them up
enablePromotionCodesAccept a discount codeNothing
enableTipsOffer a tipNothing

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 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 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:

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

Shipping needs both flags

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.

{
  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.

Name all seven days

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:

{
  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.

Last updated on

How is this guide?

On this page