Stripe Campaign donated amount fails to update

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!

3 Likes

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.

4 Likes

While Iā€™m still investigating, Iā€™m curious if clicking the ā€œRefresh Compaign Dataā€ updates the campaign amount?

EDIT: Likely wonā€™t work. Iā€™m able to replicate this issue locally.

3 Likes

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.

3 Likes

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

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.

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.

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.

4 Likes

Hey Blake,

Thatā€™s great news! Thanks so much for looking into this and getting a solution on its ways! :heart:

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

3 Likes

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.

3 Likes

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! :smiley:

3 Likes

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).

4 Likes

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ā€¦

2 Likes

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

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:

We should probably have a Payments tab on the admin page as well and there we could include a ā€œRefundā€ button.

4 Likes

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!! :smiley:

4 Likes

Hello Blake! Happy Thanksgiving!! :heart:

I hope itā€™s OK to put this here on the holiday :wink: 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ā€¦

1 Like

Happy Thanksgiving!! :hugs:

I cooked up a fix for ya:

:turkey:

5 Likes

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! :slight_smile:

ā€¦and I guess itā€™s not possible to use a similar logic for ā€œrefundedā€ payments, correct?

2 Likes

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.

4 Likes

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

3 Likes

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

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.

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

Done! :slight_smile:

1 Like