Using multiple location ids

Hi all,

I have an intuition on how to use multiple location ids, but I wanted to check with you :smile: .

Here is our flow of square.
Customer enters his card information and using web payments sdk, the token (nonce) is generated and is sent to the backend for creating a payment.

I have followed example from here.

Note: We only use location id in web payment sdk

We want to use Location ID to differentiate banks, so for certain type of customers we want to use bank X for payment/refunds/etc. and for other types of customer we want to use bank Y, Z…

Our business domain requires that for certain group of customers we use a different banks (location id). From the current context that I have, the only thing that comes up to my mind is that the backend (server) to send a location id for the logged in customer and use that location id to create web payment sdk.

What’s your opinion on this, do you have any suggestions?

You got it. If you have a select group of customers that need to have payments go to a specific location that’s linked to a particular bank account you’ll need to pass in the location_id in the CreatePayment request. Also if your allowing customer to pay with digital wallets you’ll need to initialize the Web payments SDK with the correct location_id. :slightly_smiling_face:

Hey Bryan. Awesome, thanks for the explanation :heart:, I didn’t know I can pass location_id to the CreatePayment request, that makes things a lot easier.
Just to confirm, since we are not using digital wallets, we are using credit card, can I specify only one location_id (the default one) when initialising Web payments SDK, and then when creating CreatePayment request specify the correct location_id based on the customer group.

Honestly, we don’t recommend that. We recommend keeping everything consistent. :slightly_smiling_face:

1 Like