#xephox-connect-header
1 messages · Page 1 of 1 (latest)
@verbal agate are you using Connect?
Do you have an example req_123 I can look at? You redacted it in your question
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
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
Did you write the code where the SetupIntent was created?
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
I understand, I'm asking if you are the developer who built the code that created the SetupIntent
Can you share that code?
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.
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
you wrote StripeAccount=stripe_account , earlier which isn't the same thing, more like some developer guess. You had the right intent, but you need the exact parameter/option. That's what is documented at https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header
Does that make sense?
Yeah, lemme try that
@verbal agate did it work?
Sorry, I gotta get through some random error 😢 , I'll get to you in a bit
sounds good
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?
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