Checkout UI extension shippingAddress oneTimeUse is undefined

On my checkout UI extension, I am trying to determine if a B2B customer is using their location’s address or a one-time address they added during checkout. The checkout extension API has the “oneTimeUse” field listed, but it is returning undefined for me no matter which address is selected.

The rest of the address is fine, so I don’t think it’s a scope issue.

Is this only happening with B2B customers?

Yes. For B2C customers, oneTimeUse is always false. I’m assuming it’s because all addresses entered during checkout automatically get saved on the customer’s addresses, so as far as I know, there’s no such thing as a one-time address for B2C. I am guessing that the oneTimeUse field was supposed to be useful for B2B customers only, since one-time addresses do not get saved to the company location’s addresses.

Hi again,

It’s possible that this is an issue with accessing this field - I’m connecting with our internal teams to confirm this.

Can you provide the code where you’re querying/ using useShippingAddress() with oneTimeUse?

Hi Liam,

I had contacted Shopify support regarding this, and it turns out the oneTimeUse field is only for B2C. It is supposed to match the checkbox asking if the B2C user wants to save the new address to the customer’s address list or not. It didn’t seem like there were plans to make use of this field for B2B at this time, unfortunately, so I’ll have to find a different solution. Thanks for helping look into it!

1 Like

Thanks for updating this topic with that info @VO_4126 ! Best of luck!