#alluring_tiger_61182
1 messages · Page 1 of 1 (latest)
Hello alluring_tiger_61182, we'll be with you shortly! 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.
• alluring_tiger_61182, 0 days ago, 10 messages
• alluring_tiger_61182, 4 days ago, 15 messages
• alluring_tiger_61182, 4 days ago, 2 messages
Hi there, how can I help?
$stripe = new \Stripe\StripeClient(STRIPESKKEY);
$pi = $stripe->paymentIntents->retrieve(
'pi_3O4fGNQmF5QljnRl0Tc7DTIO',
['stripe_account' => '{acct_1KsHq1QmF5QljnRl}']
);
echo $pi;
I tried to retrieve paymentIntents for a pi and for a connected account. But empty response
Am I doing something wrong?
Did you see any error?
500 internal server error is all i'm getting
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_AZQNj69xWirRfb
wait hang on
thats incorrect
This one req_oIZNAh1XLnxTPT
This is correct req_oIZNAh1XLnxTPT
I saw this in the request stripe_account: "{acct_1KsHq1QmF5QljnRl}", Remove the curly braces and try again.
Still the same req_NLkcMY6yqh6na3
Hmm, can you share with me the code?
ok
Is this what you are after?
$stripe = new \Stripe\StripeClient('sk_test_51JqyiyHFKCp84Qhw6va3hbMOhnanP0WT5fUeE3XB3itfVJzlqCCUklYaJxXEus4wmjA0UMNFmYADYlhlohgnqJxD00sFOSU8DR');
$pi = $stripe->paymentIntents->retrieve(
'pi_3O4fGNQmF5QljnRl0Tc7DTIO',
['stripe_account' => 'acct_1KsHq1QmF5QljnRl']
);
echo $pi;
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
ok sure thans
It seems you need to pass the ['stripe_account' => 'acct_1KsHq1QmF5QljnRl'] as a third argument, not second. The second one is retrieve options and should be an empty object [] in this case.
ok i'll try
Also, please remove the key from the message
Basically:
$pi = $stripe->paymentIntents->retrieve(
'pi_3O4fGNQmF5QljnRl0Tc7DTIO',
[],
['stripe_account' => 'acct_1KsHq1QmF5QljnRl']
);
oh great. It works!. Do i do the same everytime as a 3rd argument whenever querying a connected account?
The logic is the following:
- For requests where you need to provide an object ID, then it's the first argument, then the 2nd is request options (e.g.
expand), and the 3rd is like "meta-parameters" (mostly forstripe_account) - If you don't need the object ID, the first argument is request options, and the 2rd is like "meta-parameters" .
ok noted with thnaks.
Happy to help.