#Pierre Lorin Elyn-payout payments
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
sorry I'm looking for an answer for you
this way i can retrieve the charge_id beginning with py_
if you mean you have the id then you could just pass it to the https://stripe.com/docs/api/charges/retrieve API
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
you need to pass in the Stripe Account header as well
stripe.Charge.retrieve("py_", stripe_account="acc_")
but this doesn't work, I tried it
what language are you using?
python
could you please share the request id? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center 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.
the platform one
you're using the wrong Platform account
I don't agree, if i check on the stripe dashboard website
I go to paymentintent, and retrieve an id, I can query it using python
so my stripe_key is correct
Do you have 2 different Platform accounts?
one for staging and one for production
yeah I think you're using the wrong key
the key you're using for the GET is different from the one you've used for the creation of that Payment
yeah but even then that payout was made on a certain account
so in order to retrieve it you should use the API of said account
of you use another API secret it wouldn't get you that object
same for all other Stripe Objects
but I don't get it, on stripe dashboard, if i press the "test" button, it is linked to only one api_key?
how can I managed two different api_key?
just performed some checks, and I don't think it's a stripe_key issue
here's the sample:
stripe.PaymentIntent.retrieve('pi_3LIGUxDh91j58svV0VwHRB5n') this works on python
test = stripe.Charge.retrieve('py_1LIGUyRkxhsDQxGfIYHrsGk4', stripe_account='acct_1JJvaBDh91j58svV')
and this doesn't.
yet they are all linked together through the stripe account
here is the id of the failed request: req_1CGMdHmLAA2nSh
my guess is that it's not possible to retrieve charge account from a connected account, using the plateform account
but I would like to make sure this is the case
are you still here?
yes I'm taking a look at the requests you sent
could you please share the two account ids that you have?
for the QA and the Prod ones?
the connected account_id?
how do I retrieve the account_id
click on the profile icon then on Show dev tools
yes exactly
but my question is
it means automatic payouts are configured using the other account right?
not it means this payment was generated from the other account
but as the payment you are referring to is from an automated payout
oh wait a second
it's the same problem ahah
this is a payout for your account acct_1JJvaBDh91j58svV
coming from another Platform
that's why you're able to see it
hum.... looks very strange
you have an account called Elyn right?
yes
and i want to retrieve using python the charge :
'py_1LIGUyRkxhsDQxGfIYHrsGk4
i can see all information using the dashboard from web
but not using python
do you see the account id on the top left corner?
yes
`InvalidRequestError: Request req_jteIwFah9nLAyg: No such payment_intent: 'py_1LIGUyRkxhsDQxGfIYHrsGk4'
In [23]: test = stripe.PaymentIntent.retrieve('py_1LIGUyRkxhsDQxGfIYHrsGk4', stripe_account='acct_1Jecp8RkxhsDQxGf')`
that's the one you should be using
still not working
wait
my request is wrong
here's the new one
test = stripe.Charge.retrieve('py_1LIGUyRkxhsDQxGfIYHrsGk4', stripe_account='acct_1JJvaBDh91j58svV')
InvalidRequestError: Request req_eVSG7qOg8NLrS2: No such charge: 'py_1LIGUyRkxhsDQxGfIYHrsGk4'
my bad
it seems to work
i was lost in all the different accounts
test = stripe.Charge.retrieve('py_1LIGUyRkxhsDQxGfIYHrsGk4', stripe_account='acct_1Jecp8RkxhsDQxGf')
this one worked
thank you ๐
yes you mixed between the Stripe API key and the Stripe Account header
just fyi the API key should be for the Platform and the Stripe Account header for the Connect Account
Ok I'll make sure to remember it ๐
let me know if you need any more help