#demodian_api
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/1404526106970685592
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- demodian_react-native-terminal, 3 days ago, 105 messages
- demodian_terminal-update, 4 days ago, 21 messages
I guess another issue to tackle is using either the platform's readers or the connected account's readers....
I would like to say it will be the latter case more often with this mobile-based application.
the app is using beta-26 currently
Hi there. I'm going to reach out to a colleague to see if they can assist.
thanks
hi! taking a look at this now
when you say "we want to retrieve the payment intent, but it fails", do you have any more detail? are you getting a specific error message back?
(spent the weekend reworking the app startup to only initialize the StripeTerminalProvider once the event was known, so everything initializes after that point.) it fails at the payment intent retrieval, saying the payment intent (based on the secret) doesn't exist
are you sure the secrets are aligned between your frontend and your backend? usually errors like that suggest a misalignment between your public and secret key
can you share an example payment intent ID you've failed to retrieve?
give me a moment to reproduce another one
@nimble totem You are passing stripe_account header when you create the Connection Token but then you're creating the PaymentIntent on the Platform account.
The Connection Token that the SDK is using is trying to find that PaymentIntent on the Connected Account instead.
which is incorrect
So you should remove Stripe-Account header from the Connection Token creation if you want to integrate Destination Charges
pi_3Rv0qHG9Rgv0LRak0m6lgNcJ
got it back to original way of:
$payload = [
'amount' => $amount,
'currency' => 'usd',
'payment_method_types' => ['card_present'],
'capture_method' => 'manual',
'application_fee_amount' => $servicefee,
];
$intent = PaymentIntent::create($payload, [ 'stripe_account' => $acct ]);
$result = [ 'client_secret' => $intent->client_secret ];
but that still fails
Let's pause and take a step back..
What flow are you trying to integrate? Direct charges or Destination Charges?
direct for connected accounts
Gotcha. So for direct charges, you need to register the reader to a location that belongs to the Connected Account as well.
So you'd need to do following steps in the same order:
1/ https://docs.stripe.com/terminal/features/connect#direct-locations
2/ https://docs.stripe.com/terminal/features/connect#direct-connection-tokens
3/ https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=react-native&reader-type=bluetooth
4/ https://docs.stripe.com/terminal/features/connect#direct-payment-intents
5/ https://docs.stripe.com/terminal/payments/collect-card-payment#:~:text=retrievePaymentIntent (React Native)-,To,-retrieve a PaymentIntent
btw, all locations we use are for the connected account
That's great, then double check if you're passing the right Connected Account ID everywhere you use it and the location belongs to that Connected Account as well
on the PHP server, we use the stripe_account for all of the calls
Can you share the example request IDs for (https://support.stripe.com/questions/finding-the-id-for-an-api-request)
1/ Connection Token creation call
2/ PaymentIntent creation call
though on the step 2, we do not supply a location to the connection token, because we assign that on the app when they connect a reader
(i'm not logged into our platform dashboard currently. do i have to be?)
Yeah, you're using Platform's API key for these calls right?
yes
Then yeah you'd need to look into platform's logs
What connected account are you testing with?
req_ONPp4ijSKtvkbl
That request still shows PaymentIntent being created on the Platform account in live mode..
I assume that's the wrong request ID?
that was the last log entry
Yeah so a few things you want to check
1/ Are you using the right API keys in your code? live mode/ test mode?
2/ Are you passing the right Connected Account ID?
should be test since it is for our test event that was connected in test mode
Yeah so that's the wrong request ID
Try to log out the exact PaymentIntent that's getting created along with the Stripe-Account ID you're passing in. Once you do that, please share the correct req_xxx and acct_xxx IDs
how would i get the request ID from the server side?
You can log the PaymentIntent ID server-side and I'll pull the correct request from that.
connected account is acct_1Del3PBJelVBLiSM
request id req_vqwxjxu6JFQTGU
hrm i touched something and it's not generating the error popup now
moment...
looks like the example app really changed between beta-25 and beta-26. now i have to deal with that change...
fwiw, that req_xxx ID you shared is still for a PaymentIntent that was created in live mode on your platform account without a Stripe-Account header.
huh...
I'm guessing you probably have some conflicting API keys somewhere.
If you're using the Example App from our github repo then I'd recommend starting fresh and making sure you're using the right API keys along with the necessary "Stripe Connect" specific changes I outlined above
example app is the one in the beta-26 RN Terminal SDK as a reference
i'm testing this versus our existing server
Gotcha, not sure why that would change on an existing server. Because it was a live-test mode swap, the likely cause is a key mixup so I would recommend double checking your code that initializes your stripe client and where it gets that key from
the only mode this account acct_1Del3PBJelVBLiSM is only in test mode and i verified the test keys are used. ending in Dy0s
got this payment intent id: pi_3Rv1iLBJelVBLiSM0Zx6998w
looks like there was a useStripeTerminal method of processPayment in 25 that got changed to confirmPaymentIntent in 26 in the example
that was my last error... -_-
Ah good catch there! And I do see that that acount exists in live mode and the request has a live mode key so that may still be worth double checking.
[Mon Aug 11 14:53:52.188255 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] GET /apipos/stripe/c/8/1190
[Mon Aug 11 14:53:52.189159 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] super 1 sub 8
[Mon Aug 11 14:53:52.189313 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] debug mode 1
[Mon Aug 11 14:53:52.192273 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] super 1
[Mon Aug 11 14:53:52.192536 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] create acct_1Del3PBJelVBLiSM
[Mon Aug 11 14:53:52.192557 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] DEBUGGING terminal_create Array\n(\n [0] => 1\n [1] => 1190\n)\n
[Mon Aug 11 14:53:52.192562 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] In stripe terminal servicefee is 0
[Mon Aug 11 14:53:52.192565 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] In stripe terminal amount is 1190
[Mon Aug 11 14:53:52.192568 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] In stripe account is acct_1Del3PBJelVBLiSM
[Mon Aug 11 14:53:52.426359 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] payment intent is pi_3Rv1n2BJelVBLiSM1PALbSkp
[Mon Aug 11 14:53:52.426427 2025] [php7:notice] [pid 1825255] [client 172.15.108.128:46074] success - ok 200
that was my server log for the payment intent creation. the debug mode is indicating it uses the sk_test_...
sk_test...
Oh those last two were test mode, apologies I accidentally opened the logs for pi_3Rv1OhG9Rgv0LRak1lqWicfl twice which is why I thought the second one was still live.
the only bad thing about device testing is usually i have to kill expo/metro and restart it to get a clean restart on the app...
Interesting, I am not that familiar with that issue but am happy to take a look. Is a specific thing going wrong that causes the restart to be needed? Or is there a specific error that is thrown when restarting?
might be close...