#mja123_code
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/1265291315491504138
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Getting {PAYMENT_ERROR.DECLINED_BY_STRIPE_API
message: 'No Such location locationId"}
This looks like you're passing an invalid location id as "locationId" string, instead of a value liketml_12345-- you need to review you code retrieving that value
but the locationId i am passing is "tm|_Fpxhsg91xTPyqb"
That looks like it has a typo, its using a pipe | instead of L l in tml
If i replace that, it's a valid location ID for testmode on the associated account
I don't see any matchign errors on that account, do you have the request ID where you get that error?
yes sorry its because of i copied the locationid from a screenshot, but its tml here too.
The error is being thrown by stripe sdk while trying to connect to a reader.
The location of the user connecting to the reader and the location registered is different, could it might causing the issue?
Yes, locations are tied to accounts, if you're using a different account connecting to the reader, you need to create the location on that account too
no i meant the physical location of the user is different
could that be causing the issue?
No for the error you've indicated. It might impact the available readers depending on how you're set up your location registrations, but it wouldn't be an invalid location.
any idea what could go wrong?
Can you share your code initializing the SDK?
including the PK you use?
publishable key is OK to share, just never share a secret key
by publishable key you mean the sdk token?
Hmm i guess the SDK doesnt use PK so a connection toke would do, but perhaps better is the request you make to create that token on your server
sorry i dont have the server code right now, but here is the token and initializing code
pst_test_YWNjdF8xUDdLVTlIQkVTTUFLUFZLLDI1WnNOcW5McmY1ZUUxVWZQV0hHTjZDT2VSdUZQRGk_00dCEwAz29
const MainNavigator = () => {
return (
<StripeTerminalProvider logLevel="verbose" tokenProvider={stripeFetchTokenProvider}>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}>
<Stack.Screen name="Home" component={TabNavigator} />
</Stack.Navigator>
</StripeTerminalProvider>
);
};
const HomeScreen: FunctionComponent<HomeScreenProps> = ({ route }) => {
const { theme, colors } = useTheme();
const [isAccountSetupVisible, setAccountSetupVisible] = useState(false);
const authUser = useSelector(selectAuthUser);
const { showError } = useError();
const myAccount = useGetMyAccountQuery();
const bankAccount = useGetBankAccountQuery();
const [showMyDevices, setShowMyDevices] = useState(false);
const { initialize: stripeInitialize } = useStripeTerminal();
useEffect(() => {
stripeInitialize();
}, []);
ah, isee
You're using connect
The terminal location exists on the connected account
You created it directly on that account: https://dashboard.stripe.com/test/logs/req_DnHsQHjCSzLlFv
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You need to create the connection tokens the same way: https://docs.stripe.com/terminal/features/connect#direct-connection-tokens
Your connection token create request is missing the stripe_account='{{CONNECTED_ACCOUNT_ID}}', param
Thanks i will let the server team know about this. Hopefully it will fix the issue