#itaied-checkout

1 messages ยท Page 1 of 1 (latest)

drifting path
#

๐Ÿ‘‹ happy to help

#

are we talking about collecting application_fees? is this Connect related

jagged agate
#

yes

#

I'm using Stripe Connect and would like to collect application_fees

autumn citrus
#

Hey, taking over here โ€“ sorry for the delay

#

Which mode are you using Checkout in?

#

The parameters differs depending on that

jagged agate
#

payment and subscription

autumn citrus
#

So for mode: 'payment' sessions, you'd need to calculate the amount yourself from your line items

jagged agate
#

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

autumn citrus
#

Oops, wrong paste

#

Fixed

jagged agate
#

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)?

autumn citrus
#

You're using Connect, right?

#

So you're looking for a way to differentiate events by the connected account?

jagged agate
#

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

autumn citrus
#

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?

jagged agate
#

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

autumn citrus
#

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

jagged agate
#

That can actually help us. But I guess only for events executed with metadata, right?

autumn citrus
#

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?

jagged agate
#

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!

autumn citrus
#

Np!