#mja123_code

1 messages ¡ Page 1 of 1 (latest)

ripe kindleBOT
#

👋 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.

steep elbow
#

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 like tml_12345 -- you need to review you code retrieving that value

tawny kernel
#

but the locationId i am passing is "tm|_Fpxhsg91xTPyqb"

steep elbow
#

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?

tawny kernel
#

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?

steep elbow
#

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

tawny kernel
#

no i meant the physical location of the user is different

#

could that be causing the issue?

steep elbow
#

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.

tawny kernel
#

any idea what could go wrong?

steep elbow
#

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

tawny kernel
#

by publishable key you mean the sdk token?

steep elbow
#

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

tawny kernel
#

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();
  }, []);
steep elbow
#

ah, isee

#

You're using connect

#

The terminal location exists on the connected account

#

Your connection token create request is missing the stripe_account='{{CONNECTED_ACCOUNT_ID}}', param

tawny kernel
#

Thanks i will let the server team know about this. Hopefully it will fix the issue