Pickup Point Delivery Option Generator using wrong pickup address

We use a Pickup Point Delivery Option Generator that just returns a list of pickup locations. This is working fine but in some cases even though the customer selects a certain pickup point, Shopify is assigning the first point on the list when the customer checks their order after checkout.

The only logging I can see around this time that might be causing an issue is after the initial address is entered to the pickup orders section of the checkout, a trigger is being made by Shopify to request the pickup_point_delivery_option_generator endpoint, which then makes the fetch with NULL as the longitude and latitude variables.

purchase.pickup-point-delivery-option-generator.fetch

      {
  "deliveryAddress": {
    "countryCode": "GB",
    "longitude": null,
    "latitude": null
  }
}

Because the input coordinates are null, the function cannot perform any distance-based sorting. It returns our raw list of stores in the default order.

Shopify checkout then appears to “shadow-select” the first item in the array of pickup locations (Index 0).

Anyone encountered this before. Not sure how to investigate our issue any further.

Hi @geekstreak

This looks like a known edge case with the pickup-point-delivery-option-generator function.

What’s likely happening is:

  • Shopify calls your generator twice during checkout.
  • The first call happens right after the customer enters the address, but before geocoding finishes, so latitude and longitude are null.
  • At that point, your function returns the pickup points in the default order, and Shopify temporarily selects the first option internally.
  • Then Shopify makes a second call once the coordinates are available, and your distance-based sorting works correctly.

The problem is that when the customer selects another pickup point from the correctly sorted list, Shopify may still be keeping the first temporary selection from the initial call.

A few things worth checking:

  • Make sure every pickup point has a stable and unique ID.
  • The same pickup location should return the exact same ID in both calls.
  • Avoid relying on array order because Shopify should track the selected pickup point using its ID, not its position in the list.
  • Also double-check the function response structure and confirm all required fields are being returned correctly.

Docs reference:
Pickup Point Delivery Option Generator API reference

If everything looks correct on your side, then write to Shopify Support so they can investigate further from their logs.

Thanks