How to make sure the Zapiet pickup location matches the checkout address on Shopify
Short answer: When a shopper chooses store pickup in the cart, block checkout if the address entered at checkout is not the chosen pickup location. In Checkpost, choose “Pickup location must match the address” from Templates, adjust the values, test it, then save and enable the rule.
The problem
A cart pickup selector can save one location while checkout receives another street or city. When the integration writes pickup-location attributes and expects a store address, this rule compares those saved values with checkout rather than accepting a mismatch silently.
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Pickup location must match the address.
- Uses Zapiet's cart attributes (Checkout-Method, Pickup-Location-…). Check the exact names on a recent pickup order and rename them if your app differs.
- Use Try this rule to test a sample cart, then click Save rule.
The rule
Checkout is blocked when all of these conditions are true:
- Cart attribute "Checkout-Method" is any of pickup
- (Cart attribute "Pickup-Location-Address-Line-1" is different from the shipping address line 1 OR Cart attribute "Pickup-Location-City" is different from the shipping city)
Shoppers see: “This address doesn't match the pickup location you chose. Use the store's address or switch to delivery.” at the address line 1, once they reach checkout.
Rule definition (JSON)
{
"name": "Pickup location matches address",
"match": "all",
"conditions": [
{
"kind": "attribute",
"key": "Checkout-Method",
"op": "equals_any",
"values": [
"pickup"
]
},
{
"kind": "group",
"match": "any",
"conditions": [
{
"kind": "compare",
"left": {
"source": "attribute",
"key": "Pickup-Location-Address-Line-1"
},
"op": "not_equals",
"right": {
"source": "field",
"field": "ship_address1"
}
},
{
"kind": "compare",
"left": {
"source": "attribute",
"key": "Pickup-Location-City"
},
"op": "not_equals",
"right": {
"source": "field",
"field": "ship_city"
}
}
]
}
],
"message": "This address doesn't match the pickup location you chose. Use the store's address or switch to delivery.",
"target": "address1",
"runOn": "checkout"
}Examples with the default settings
These outcomes apply to this rule alone. Other enabled rules may also affect checkout.
| Test cart | Expected outcome |
|---|---|
| Pickup attribute and entered street/city agree | Allowed by this rule |
| Pickup location says York; checkout says Leeds | Checkout blocked |
Where this rule works
These are cart and checkout validations, including supported accelerated checkouts. They are current-cart policies; they do not track previous purchases of a SKU. Shopify excludes POS, recurring subscription orders and native pre-order/Try Before You Buy flows from this API. See Shopify's validation compatibility.
Tips
- Check the exact cart attribute keys on your integration. The defaults are Checkout-Method, Pickup-Location-Address-Line-1 and Pickup-Location-City; rename them if your version uses other keys.
- Use this only for integrations that expect the pickup location's address at checkout. Native pickup can use customer contact details without requiring a store-address comparison.
- Blank or missing comparison values do not block. This rule detects a mismatch, not missing integration data; test your picker writes both values.
- Comparisons ignore case, spacing and punctuation. They do not resolve street abbreviations or verify that an address exists.
FAQ
Does this compare Shopify location IDs?
No. The preset compares saved street and city strings. It does not read a native location ID.
Will St and Street be considered the same?
Not automatically. Punctuation and case are normalised, but abbreviations are not expanded. Use consistent values from your integration.
Related rules
Require a delivery or pickup date
Block checkout when the shopper chose local delivery or pickup but didn't pick a date in the cart, so every order arrives with a slot.
Pickup chosen, but shipping selected
If the shopper chose pickup in the cart, block checkout when they then select a shipping rate instead of pickup.