#z_connect-terminal-locations
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1263914121850785832
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
Are you trying to share a reader between connect accounts?
No, I want a set of particular readers to be isolated to one connect account
For example, an iPhone and Stripe M2 reader
Can you share the request to create the location?
Yes
It will start with req_
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Oh let me see
req_ZqmIJkyvMnPHFJ
Sorry, try this one
req_J6WqsjIfXdSUMQ
This is the call I made through my API
try{
console.log(req.body)
const location = await stripe.terminal.locations.create(
{
display_name: 'HQ',
address: {
line1: '1272 Valencia Street',
city: 'San Francisco',
state: 'CA',
country: 'US',
postal_code: '94110',
},
},
{
stripeAccount: req.body.account_id,
}
);
console.log(location)
res.send(location)
} catch(err){
res.status(500)
res.send(JSON.stringify({
error: err.type,
message: err.message}));
}
I checked on the connected account's dashboard but the location was not found. Rather, I found it on my main dev account.
Is there somewhere that needs that account id?
Like
<StripeTerminalProvider
logLevel="verbose"
tokenProvider={fetchTokenProvider}
//connected account?
>.... </StripeTerminalProvider>
Okay thanks for this. Taking a look.
It seems you did not specify the Stripe Account header. You can review the code syntax here:
https://docs.stripe.com/connect/authentication
Both for your NodeJs and React components
This has the header, correct?
But I don't think the syntax was correct because I don't see the account header in the API request.
Yeah, that is what I am thinking as well. However, that code was copied from the documentation. I think it is related to the StripeTerminalProvider missing the connect account id. We can close it for now and if I have other questions, I can reopen this thread.
The last code snippet in the doc I provided shows how you can add the stripeAccount header to the React providers
thank you.
Also we don't re-open threads here. You are welcome to ask a new Q though!
Oh, I see.