#tousifali

1 messages · Page 1 of 1 (latest)

fallow sandBOT
keen flame
#

👋 happy to help

#

would you mind elaborating more?

honest relic
#

Sure

#

Basically I have implemented event ticket purchase with help of charge AP

#

API*

#

user is also buying tickets for their friends, spouce etc

#

now we want to allow user to use iterative (repeater field) to add more ticket on same page and at the end press pay button.

#

I create all those payments and create separate charge objects on Stripe so that I can refund them separately when needed. All the gs I need to do in one request to stripe server.

one way is to loop through charge API but that might take longer if we have more tickets to buy.

keen flame
#

I highly recommend not doing that

honest relic
#

yes I don't want to loop because it create more uncertainty and bugs.

#

what else should I do?

keen flame
#

you can just use the PaymentIntent API

#

no need to do multiple charges, you can sum the total and pass it as the amount of the PaymentIntent

#

for refunds, you can always do partial refunds

honest relic
#

but all code is ready. Refund and all code was there

#

is there something that on your end stripe create different charge ids

keen flame
#

this is really not the recommended integration

#

it's not going to be really hard to change your code to use the PaymentIntents API

#

it also explains how to deal with partial refunds

honest relic
#

ok I will check that thanks.