#itaied-checkout
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
are we talking about collecting application_fees? is this Connect related
Hey, taking over here โ sorry for the delay
Which mode are you using Checkout in?
The parameters differs depending on that
payment and subscription
mode: 'payment': https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-application_fee_amount
mode: 'subscription': https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-application_fee_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So for mode: 'payment' sessions, you'd need to calculate the amount yourself from your line items
I think you sent the wrong link. I'm using Express built-in checkout and you sent me the js reference wallets docs
But anyway, I think I understand. Thanks
If you could send me the sources link it would be helpful
another question:
Is it possible to attach metadata on webhooks events?
We have a single-tenant architecture on our single Stripe account.
Because multiple deployments (our customers) are connected to our account, we need to know for which deployment the webhook came from.
Is it possible to attach some identifier to the events?
Or even connect multiple webhooks dynamically depending on some rule (for example, a region)?
You're using Connect, right?
So you're looking for a way to differentiate events by the connected account?
yes, but it's actually a bit more complicated because we group the connected account to deployments.
So I may receive an event from connected_account_a and I need a way to know which group he is from.
My backend system knows it, so I need a way to send this metadata somehow
You can configure a Connect webhook which will take care of this: https://stripe.com/docs/connect/webhooks
An account field will be included in the payload
So, I guess you could lookup the group from your own API using the acct_xxx ID from the event?
Yes, that is what I thought after reading the docs.
The problem is we are single-tenant, so I don't know which database to look in
Hmm. Not sure. To answer your original question, there's no way to set metadata on every event
Generally the metadata will reflect the metadata from the related object
i.e. payment_intent.succeeded will have the metadata from the related PI
That can actually help us. But I guess only for events executed with metadata, right?
Yep, exactly. So would mean passing metadata fields on every object you create
Would be pretty brittle
Not some way you can map a Stripe acct_xxx ID to a database in your API?
I agree, it's not something we would like to do...
mm... can't tell right away, I'll need to dig in.
Thank you for your suport, you helped me a lot!
Np!