#standup75
1 messages · Page 1 of 1 (latest)
Hi there, so you want to listen to account.updated events created on connected accounts, am I right?
yes
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.
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
Are you doing a destination charge?
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,
})
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
but it will appear in the connected account dashboard?
No it won't.
hmm, so I should probably add that header
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)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
To learn more about destination charge, read https://stripe.com/docs/connect/destination-charges
gotcha, will do that, thanks a lot
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?
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.
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?
Are you listening to webhooks ?
The payment_intent doesn't carry product info, so you should listen to checkout.session.completed event and check its payment_status (https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_status). The details are explained in https://stripe.com/docs/payments/checkout/fulfill-orders#fulfill
hmm, ok, will try that, thank you