I am creating a check-out for my subscription business using Stripe.js - and I am stuck on the final small detail.
How do I get PaymentIntent or Charge returned from the API?
The subscription is created using “Stripe.js - subscription - create”, which - in contrast to the “Stripe.js - Paymentintent - Create” doesn’t create a paymentintent. The latter can only be used for 1 time products as I can see.
And in order to use the “Stripe.js - Refund - Create”, the parameter of PaymentIntent or Charge is required.
Longer story
I have successfully set up the creation of a user, attach payment method and creating a subscription. The subscription charge is done every 4 weeks and the actual delivery is 4 boxes. I want to allow the user to cancel one or more boxes every month.
My idea is to do this by simply creating a refund for number of boxes cancelled in the month (better suggestions are welcome as well!).
However, to do this I need the paymentIntent Id or Charge for that month’s subscription. Where do I get that from?