#mike35x95x1-checkout

1 messages ยท Page 1 of 1 (latest)

frigid gazelle
#

hi! I wasn't aware we had a partial payment feature in Checkout so I'm not sure how you'd test it. Do you have a reference to this?

fluid olive
#

omg - so I misunderstood something ๐Ÿคฆโ€โ™‚๏ธ

#

can you please explain situation when there are multiple charges on one checkout?

frigid gazelle
#

usually it means the customer tried to pay and it declined, and they tried again, and etc until one of them succeeds

fluid olive
#

I see... so I only can read the last one and see if it's successful, right?

frigid gazelle
#

well if it's Checkout you only need to look when you recieve a checkout.session.completed webhook event and at that point you know the payment was successful; the details are in the PaymentIntent and payment_intent.charges.data[0] associated with the Session.

fluid olive
#

yes, I know. I have both ways how to know the result (based which comes first). Can I rely on paymentIntent.amount_received or should I read it from successful charge? or it doesn't matter?

frigid gazelle
#

they both seem fine

fluid olive
#

ok, thank you

#

oh, one more thing

#

is it possible to define app commission (excluding stripe fees) before transfer to connected account? example:

  1. total amount = 10 USD
  2. commission (8%, min. 2 USD) = 2 USD
  3. stripe fees (based on card) = 1.5 USD
  4. amount to transfer 6.5 USD
frigid gazelle
fluid olive
#

According to the docs the application_fee_amount is regardless the stripe fees. The problem is that we don't know the fees before the payment and we don't want to pay the fees from our pocket. On the other hand we don't want to include the highest possible stripe fees (to cover all scenarios) which would make our commission too high. So we don't use auto transfer and calculate the fee on our side and create the transfer manually. Any suggestion how to do it another way?

frigid gazelle
#

yes you can't know the exact Stripe fee upfront since e.g. it might be different if the customer chooses a certain type of card

fluid olive
#

exactly. it would be nice to have same parameter "add_fees_in_commission"

frigid gazelle
#

the recommended approach is to take a blended fee amount that lets you make a profit in any circumstance (but you say you don't want that)

fluid olive
#

ok, thanks

fluid olive
#

can you please explain this?

#

is the amount_captured in % or in "money"?

#

the reference to the "amount attribute" makes it even more confusing

thorn dew
#

Taking over for my colleague. Let me catch up.

fluid olive
#

well, yes. I am trying to find out which field(s) I should use to get amount captured by the charge on linked to the paymentIntent

#

there is paymentIntent.amount_received and paymentIntent.charge.amount_capture.

#

the sdk tells me it's in %s... ๐Ÿ˜ฎ

thorn dew
#

You should refer to the official documentation

Amount in cents captured (can be less than the amount attribute on the charge if a partial capture was made).
based on the documentation, the amount is in cents
it mentions that the amount is in cents

fluid olive
#

well, ok. ๐Ÿ™‚ I will follow the website rather than the documentation in the code... ๐Ÿ™‚

thorn dew
fluid olive
#

back to my question - which field(s) I should use to calculate real money captured on the paymentIntent?

#

the amount_received or charge.amount_captured? is there safer (more correct) way?

thorn dew