# Stripe Campaign donated amount fails to update

**URL:** https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591
**Category:** Support
**Tags:** subscriptions
**Created:** [November 19, 2021, 1:58am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591 "2021-11-19T01:58:07Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 19, 2021, 1:58am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/1 "2021-11-19T01:58:07Z")

</div>

Dear Stripe plugin developers,

For our site (jbpdaily), we decided to go with one-time payments using a campaign (and an associated Stripe Product id), and the donations go through alright (show up in Stripe), but the amount displayed in the top banner does not update (it does show the users who donated, but the amount still reads $0 of the campaign target). Is there a web hook that needs to be activated in Stripe to allow reading the amount of money that was paid for a product with a given ID?

Alternatively, would it be possible to manually override the “achieved amount” somehow?

Thank you!

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [November 19, 2021, 3:00am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/2 "2021-11-19T03:00:41Z")

</div>

It’s likely a bug and I’ll investigate tomorrow and let you know what I come up with. We are also working on proper support for single purchase items.

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [November 19, 2021, 8:34pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/4 "2021-11-19T20:34:29Z")

</div>

While I’m still investigating, I’m curious if clicking the “Refresh Compaign Data” updates the campaign amount?

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/4/d4f4e897906e75d61378f766e9cfedd127dbb886.png)

EDIT: Likely won’t work. I’m able to replicate this issue locally.

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 20, 2021, 2:31am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/5 "2021-11-20T02:31:32Z")

</div>

Yeah, I just tried this, and nothing updated/happened.

One reason might be that I configured the product (with 3 price levels) in Stripe—and not using the “+ New Product” button in Discourse. I also don’t fully understand how Discourse would sync the products/prices with Stripe.

When I read the original documentation, the “webhooks” section only mentioned three of those, all under customer.subscription (.created, .deleted, .updated). I assume that for single product purchases, different webhooks would be necessary…?

I mean, when the transaction is successful, Discourse **does** register this (for a user), since when they try to pay again, it does show a message of

> **Thanks so much for your prior purchase of this product!**

However, when I then click on “Go to Billing”, both the Subscriptions and the Payments sub-section/tab are empty.

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [November 21, 2021, 12:58am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/6 "2021-11-21T00:58:44Z")

</div>

I just created a PR that should fix the amount raised not showing up for one-time purchases.

[https://github.com/discourse/discourse-subscriptions/pull/95](https://github.com/discourse/discourse-subscriptions/pull/95)

But I need to wait for it to be reviewed and deployed to your site. I’ll keep you updated on when that has been done and you can test again.

> [@jochen\_weber](#):
>
> One reason might be that I configured the product (with 3 price levels) in Stripe—and not using the “+ New Product” button in Discourse.

Ah okay. This is useful info, but is not the cause of the issue. At some point though I would like to update the plugin so that it completely ignores anything that wasn’t actually created directly in Discourse to avoid this type of confusion.

> [@jochen\_weber](#):
>
> I also don’t fully understand how Discourse would sync the products/prices with Stripe.

One reason that some of this functionality is still working is because you have added the product id to the `discourse_subscriptions_campaign_product` Site Setting. This is allowing for purchases, but because the product wasn’t added through discourse some functionality is missing.

I just manually added the product id you have added to stripe to your discourse instance so that things should show up correctly under billing.

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 21, 2021, 2:07am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/7 "2021-11-21T02:07:01Z")

</div>

Hey Blake,

That’s great news! Thanks so much for looking into this and getting a solution on its ways! ❤

If you need me for testing whenever the PR is pushed to production, let me know!!

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [November 22, 2021, 11:57pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/8 "2021-11-22T23:57:25Z")

</div>

Okay this fix has been deployed to your site. Can you verify the donated amount is showing correctly now?

If you get a new donation there is still ~30 min delay of when it will update the banner, but I’m going to work on improving that so it is instant.

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 23, 2021, 1:01am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/9 "2021-11-23T01:01:16Z")

</div>

Hey Blake,

**YES!!** It’s showing up correctly now. I will now test making a refund (to see how that works, and then also whether it updates that as well).

Cheers! 😃

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [November 23, 2021, 1:04am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/10 "2021-11-23T01:04:10Z")

</div>

Sweet! Glad it’s working. Ya that refund will be a good test.

For quicker updates you can manually press the “Refresh Compaign Data” button. Otherwise it will be updated every 30 min (for now).

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 23, 2021, 2:01am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/11 "2021-11-23T02:01:10Z")

</div>

I processed the refund via the Stripe website. So far, the amount hasn’t updated. Will check back tomorrow.

Maybe it’d be nice if the refund could be done from within the Discourse software? For that it would be necessary to somewhere see the individual payments, I guess…

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [November 23, 2021, 3:35am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/12 "2021-11-23T03:35:03Z")

</div>

> [@jochen\_weber](#):
>
> I processed the refund via the Stripe website.

Ah okay, I don’t think I accounted for this, but will work on that next so that it is reflected in the banner.

> [@jochen\_weber](#):
>
> Maybe it’d be nice if the refund could be done from within the Discourse software? For that it would be necessary to somewhere see the individual payments

Yes, that would be something I’d like to add support for. Right now you can only see payments under the specific user’s billing page:

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/b/db90e53ac5b5ea52e1861c29d90f0b522ba8209e.png)

We should probably have a Payments tab on the admin page as well and there we could include a “Refund” button.

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/5/a53acd0325a5749e62d8e8bf698a1356a063ad5b.png)

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 23, 2021, 5:10am UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/13 "2021-11-23T05:10:21Z")

</div>

Hey Blake,

Thanks for working on this so promptly! If there’s anything I can do for further testing, etc., let me know! In the meantime, I’ve heard from the person whom I’m partnering with at this community that the banner really looks great. So, at least on our end, we really love the design!

Cheers!! 😃

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 25, 2021, 1:25pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/14 "2021-11-25T13:25:56Z")

</div>

Hello Blake! Happy Thanksgiving!! ❤

I hope it’s OK to put this here on the holiday 😉 A user tried to purchase a product for the campaign, but the CVC code was denied (I can see a “blocked” payment in Stripe). The user then successfully purchased a different price tier (same product id), but the total of the campaign added both amounts. Just thought I’d point this out…

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [November 25, 2021, 2:46pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/15 "2021-11-25T14:46:37Z")

</div>

Happy Thanksgiving!! 🤗

I cooked up a fix for ya:

[https://github.com/discourse/discourse-subscriptions/pull/96](https://github.com/discourse/discourse-subscriptions/pull/96)

🦃

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 26, 2021, 2:59pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/16 "2021-11-26T14:59:35Z")

</div>

Hey Blake,

Thanks so much! Can you let me know when this is rolled out to production (for our community forum), I’ll then let you know if it displays correctly! 🙂

_…and I guess it’s not possible to use a similar logic for “refunded” payments, correct?_

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [November 26, 2021, 3:31pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/17 "2021-11-26T15:31:23Z")

</div>

Your site should get deployed again in the next few days but I’ll follow up and let you when it has.

The refund logic is a bit more involved. It’s on my list though.

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [November 29, 2021, 3:25pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/20 "2021-11-29T15:25:58Z")

</div>

> [@jochen\_weber](#):
>
> Can you let me know when this is rolled out to production (for our community forum)

And done! The deploy was completed an hour ago, so the changes should be live on your end by now.

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 29, 2021, 4:47pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/21 "2021-11-29T16:47:46Z")

</div>

Looks great! Thank you so much, @Blake and @osioke! ❤

If (over the next few weeks/months) it would be possible to also track/integrate refunds (both in the tally, as well as allowing people to make another contribution to an existing campaign), this would be appreciated.

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [November 29, 2021, 8:12pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/22 "2021-11-29T20:12:32Z")

</div>

Can you create a separate #Contribute > Feature topic for the new request? So we can close this one off as todone.

---

<div class="post-metadata">

### Author: ![jochen\_weber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jochen_weber/32/167516_2.png) [@jochen\_weber](https://meta.discourse.org/u/jochen_weber)
#### Post date: [November 29, 2021, 8:39pm UTC](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591/23 "2021-11-29T20:39:00Z")

</div>

Done! 🙂

> [@Handle Stripe-initiated refunds for campaigns](https://meta.discourse.org/t/handle-stripe-initiated-refunds-for-campaigns/210447):
>
> As a requested continuation / follow-up to [[Stripe Campaign donated amount fails to update](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591)]: It would be wonderful if the Stripe payments plugin (for campaigns in this instance) would correctly reflect refunded payments by the tally correctly reflecting refunded payments allowing users whose contribution was refunded have the option to pay (say a different amount) One solution might be to allow refunding from within the Discourse plugin interface, by importing/showing the payments made on a …

[Next page](https://meta.discourse.org/t/stripe-campaign-donated-amount-fails-to-update/209591.md?page=2)
