#Pierre Lorin Elyn-payout payments

1 messages ยท Page 1 of 1 (latest)

red pewter
#

๐Ÿ‘‹ happy to help

#

sorry I'm looking for an answer for you

river tundra
#

this way i can retrieve the charge_id beginning with py_

red pewter
river tundra
#

it doesn't work

#

as it is a connected account charge

red pewter
#

you need to pass in the Stripe Account header as well

river tundra
#

stripe.Charge.retrieve("py_", stripe_account="acc_")

#

but this doesn't work, I tried it

red pewter
#

what language are you using?

river tundra
#

python

red pewter
river tundra
#

ok

#

req_ljl2wlltsZImDA

red pewter
#

I'm taking a look

#

are you the Platform or Connected Account?

river tundra
#

the platform one

red pewter
#

you're using the wrong Platform account

river tundra
#

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

red pewter
#

Do you have 2 different Platform accounts?

river tundra
#

one for staging and one for production

red pewter
#

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

river tundra
#

the payment was made automatic

#

it's from automatic payout

red pewter
#

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

river tundra
#

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?

red pewter
#

in your python code

#

you might be using the secret key of the other Account

river tundra
#

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?

red pewter
#

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?

river tundra
#

the connected account_id?

red pewter
#

no

#

the platform accounts

river tundra
#

how do I retrieve the account_id

red pewter
#

click on the profile icon then on Show dev tools

river tundra
#

found it

#

the prod one is acct_1JJvaBDh91j58svV

red pewter
#

the payout wasn't created on that account

#

it was created on the other one

river tundra
#

we only have one account though

#

maybe I don't have access to the other account

red pewter
#

yes exactly

river tundra
#

but my question is

#

it means automatic payouts are configured using the other account right?

red pewter
#

not it means this payment was generated from the other account

river tundra
#

but as the payment you are referring to is from an automated payout

red pewter
#

oh wait a second

river tundra
#

it's the same problem ahah

red pewter
#

this is a payout for your account acct_1JJvaBDh91j58svV

#

coming from another Platform

#

that's why you're able to see it

river tundra
#

hum.... looks very strange

red pewter
#

you have an account called Elyn right?

river tundra
#

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

red pewter
#

ok ok

#

let's start from the beginning

river tundra
#

see

red pewter
#

do you see the account id on the top left corner?

river tundra
#

yes

#

`InvalidRequestError: Request req_jteIwFah9nLAyg: No such payment_intent: 'py_1LIGUyRkxhsDQxGfIYHrsGk4'

In [23]: test = stripe.PaymentIntent.retrieve('py_1LIGUyRkxhsDQxGfIYHrsGk4', stripe_account='acct_1Jecp8RkxhsDQxGf')`

red pewter
#

that's the one you should be using

river tundra
#

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 ๐Ÿ™‚

red pewter
#

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

river tundra
#

Ok I'll make sure to remember it ๐Ÿ™‚

red pewter
#

let me know if you need any more help