# Stripe.js - issue refund on subscriptions; how to get PaymentIntent

**URL:** <https://forum.bubble.io/t/stripe-js-issue-refund-on-subscriptions-how-to-get-paymentintent/120627>\
**Category:** APIs\
**Created:** [November 11, 2020, 9:43pm UTC](https://forum.bubble.io/t/stripe-js-issue-refund-on-subscriptions-how-to-get-paymentintent/120627 "2020-11-11T21:43:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maja-overgaard](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/maja-overgaard/32/114696_2.png) [@maja-overgaard](https://forum.bubble.io/u/maja-overgaard)\
**Post date:** [November 11, 2020, 9:43pm UTC](https://forum.bubble.io/t/stripe-js-issue-refund-on-subscriptions-how-to-get-paymentintent/120627/1 "2020-11-11T21:43:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![maja-overgaard](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/maja-overgaard/32/114696_2.png) [@maja-overgaard](https://forum.bubble.io/u/maja-overgaard)\
**Post date:** [November 27, 2020, 9:09am UTC](https://forum.bubble.io/t/stripe-js-issue-refund-on-subscriptions-how-to-get-paymentintent/120627/2 "2020-11-27T09:09:23Z")

</div>

In case someone else is looking for the same: I figured it out by building my own API. Happy to write more about the solution if anyone is in need of it.

---

<div class="post-metadata">

**Author:** ![bozhieva93](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@bozhieva93](https://forum.bubble.io/u/bozhieva93)\
**Post date:** [June 18, 2022, 4:15am UTC](https://forum.bubble.io/t/stripe-js-issue-refund-on-subscriptions-how-to-get-paymentintent/120627/3 "2022-06-18T04:15:28Z")

</div>

Hello, if you could please share what API call you used to refund a subscription payment? thank you

---

<div class="post-metadata">

**Author:** ![maja-overgaard](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/maja-overgaard/32/114696_2.png) [@maja-overgaard](https://forum.bubble.io/u/maja-overgaard)\
**Post date:** [September 7, 2022, 1:00pm UTC](https://forum.bubble.io/t/stripe-js-issue-refund-on-subscriptions-how-to-get-paymentintent/120627/4 "2022-09-07T13:00:34Z")

</div>

Sorry, I’m first seeing this now. Do you still need it? 🙂

---

<div class="post-metadata">

**Author:** ![drozhatvids](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/drozhatvids/32/141823_2.png) [@drozhatvids](https://forum.bubble.io/u/drozhatvids)\
**Post date:** [February 15, 2023, 10:31am UTC](https://forum.bubble.io/t/stripe-js-issue-refund-on-subscriptions-how-to-get-paymentintent/120627/5 "2023-02-15T10:31:45Z")

</div>

@maja-overgaard I am in need of this API. Thanks in advance!
