#xephox-connect-header

1 messages · Page 1 of 1 (latest)

silver lightBOT
solar locust
#

@verbal agate are you using Connect?

#

Do you have an example req_123 I can look at? You redacted it in your question

verbal agate
#

req_WIyRw1nL7DzR1a

#

will that help?

solar locust
#

yep let me have a look

#

Okay so yeah you are a platform and you seem to be using Direct Charges. So when you collected the payment it was on the connected account right?
So your code must pass the connected account's id in the Stripe-Account header as documented in https://support.stripe.com/contact

So when you want to update the PaymentMethod you have to do the same

#

xephox-connect-header

verbal agate
#
                payment_id,
                metadata=metadata,
                StripeAccount=stripe_account ,
            )

so something like this? the link just takes me to a contact page... the docs for PaymentMethods.modify() doesn't have a stripe account parameter

solar locust
#

Did you write the code where the SetupIntent was created?

verbal agate
#

nope, this is written where the setup_intent.succeded event is handled

#

I do pass the stripe account details when I create the setup intent

solar locust
#

I understand, I'm asking if you are the developer who built the code that created the SetupIntent

#

Can you share that code?

verbal agate
#

Yeah I am not the dev who did the setup intent, I do not thing I can share the entire code,

stripe.SetupIntent.create(
                customer=stripe_id,
                payment_method_types=["card"],
                stripe_account=stripe_app,
                api_key=stripe_key,
                metadata={'custom_id': '123'}
            )

Its something like this.

solar locust
#

okay so you see in the middle your code is passing stripe_account=stripe_app,

#

That means "please create this SetupIntent on the connected account with the id inside my variable stripe_app

#

you need to do the same for any API request you make on that account. So you have to pass the same thing to stripe.PaymentMethod.modify

#

Does that make sense?

verbal agate
#

Yeah, lemme try that

solar locust
#

@verbal agate did it work?

verbal agate
#

Sorry, I gotta get through some random error 😢 , I'll get to you in a bit

solar locust
#

sounds good

verbal agate
#

Hey i think will take some time, its getting late here probably gonna come back and fix it tomm .... can we keep this thread open ? or can i just message on dev-help?

solar locust
#

we will close the thread but you can just ask again for help tomorrow if you still need help.
Really when you get the Event on your Connect webhook endpoint, the Event will have the account property which is the id of the connected account on which the Event happened. That's the id you'd pass in the stripe_account="acct_123" option in your call to the modify API