#harshit.tyagi

1 messages · Page 1 of 1 (latest)

vast sorrelBOT
vast mason
earnest edge
#

But, my use case doesn't allow me to consider the discount when calculating the amount for transfer_data. I have multiple type of stripe promo codes which give different discount % to customers .. so I don't know which promo code will be availed by customer.

#

@vast mason

vast mason
#

There's no need to tag me, I'd reply you eventually

#

So I believe the problem here is that you don't know what promo code that your customer will use when creating the checkout session.

earnest edge
#

Yes, that's correct

vast mason
#

OK, please try this out. Create a checkout session with paymentIntent' capture_method=manual, once the checkout session completes, capture the PaymentIntent with the new transfer_data[amount]

earnest edge
#

okay, so when and where should I specify the connect transfer amount if I use this capture_method=manual?

vast mason
earnest edge
#

hmm ... okay so what I am understanding here - there would be two separate api calls

  1. to create the checkout session
  2. to capture the amount and to do the connect transfer
#

but in this process, how'd would I get the discounted amount .. because I think I'd need that to make the second call?