#standup75

1 messages · Page 1 of 1 (latest)

safe zincBOT
nimble egret
#

Hi there, so you want to listen to account.updated events created on connected accounts, am I right?

primal linden
#

yes

nimble egret
#

https://stripe.com/docs/connect/webhooks You need to use Connect Webhook in this case. When you create a webhook endpoint through Dashboard, you need to check the Events on Connected Accounts radio box.

Learn how to use webhooks with Connect to be notified of Stripe activity.

primal linden
#

ok, trying...

#

beautiful

#

thank you, I had completly missed that

#

for payment it won't be a connected webhook though? Eventhough the payment is for a connected account

nimble egret
#

Are you doing a destination charge?

primal linden
#

Is that the default one? Not sure that I am specifying anything

#

const { url, paymentIntentId } = await createCheckoutSession({
callbackUrl,
cancelUrl,
stripeCustomerId: stripeCustomerId,
itListId,
name: itList.name,
imageUrl: itList.imageUrl,
price: itList.price,
applicationFee,
stripeCreatorId: itList.creator.stripeCreatorId,
})

nimble egret
#

You didn't specify a stripe-account header in this request, so this request will be processed in your account (aka platform), instead of a connected account

primal linden
#

but it will appear in the connected account dashboard?

nimble egret
#

No it won't.

primal linden
#

hmm, so I should probably add that header

nimble egret
#

I'd recommend using destination charge for express connected accounts. So you just need to specify a transfer_data.destination when creating a Checkout session (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_data-destination)

primal linden
#

gotcha, will do that, thanks a lot

primal linden
#

Hi! I am create a checkoutSession and I was expecting it to return a payment_intent so I can link the purchase to the payment confirmation, but I got payment_intent: null instead. Is it the wrong way to link purchase and purchase confirmation?

nimble egret
#

About you latest question on payment_intent. The payment_intent on a checkout session will be created later when customer attempt the payment in the checkout page.

primal linden
#

ok, I was using this to connect the confirmation (payment_intent.succeeded) with the product bought. Our products are not hosted on stripe to avoid sync hell. What's the best way to make the connection between a payment_intent.succeeded and a product then?

#

I do pass in product data, I can set the name as our productId if this is also sent with the payment_intent?

nimble egret
#

Are you listening to webhooks ?

primal linden
#

yes

#

that's what I meant by payment_intent.succeeded, the event

nimble egret
primal linden
#

hmm, ok, will try that, thank you