#demodian_api

1 messages ยท Page 1 of 1 (latest)

sterile birchBOT
#

๐Ÿ‘‹ 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.

nimble totem
#

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.

nimble totem
#

the app is using beta-26 currently

wind saddle
#

Hi there. I'm going to reach out to a colleague to see if they can assist.

nimble totem
#

thanks

minor anvil
#

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?

nimble totem
#

(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

minor anvil
#

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?

sterile birchBOT
nimble totem
#

give me a moment to reproduce another one

night notch
#

@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

nimble totem
#

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

night notch
#

Let's pause and take a step back..

What flow are you trying to integrate? Direct charges or Destination Charges?

nimble totem
#

direct for connected accounts

nimble totem
#

btw, all locations we use are for the connected account

night notch
#

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

nimble totem
#

on the PHP server, we use the stripe_account for all of the calls

night notch
nimble totem
#

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?)

night notch
#

Yeah, you're using Platform's API key for these calls right?

nimble totem
#

yes

night notch
#

Then yeah you'd need to look into platform's logs

#

What connected account are you testing with?

nimble totem
#

req_ONPp4ijSKtvkbl

night notch
#

That request still shows PaymentIntent being created on the Platform account in live mode..

#

I assume that's the wrong request ID?

nimble totem
#

that was the last log entry

night notch
#

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?

nimble totem
#

should be test since it is for our test event that was connected in test mode

night notch
#

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

nimble totem
#

how would i get the request ID from the server side?

night notch
#

You can log the PaymentIntent ID server-side and I'll pull the correct request from that.

nimble totem
#

ok

#

moment

sterile birchBOT
nimble totem
#

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

night notch
#

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.

nimble totem
#

huh...

night notch
#

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

sterile birchBOT
nimble totem
#

example app is the one in the beta-26 RN Terminal SDK as a reference

#

i'm testing this versus our existing server

hollow widget
#

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

nimble totem
#

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

hollow widget
#

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.

nimble totem
#

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

hollow widget
#

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.

nimble totem
#

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

hollow widget
#

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?

nimble totem
#

might be close...