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?
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.
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.
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.
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.
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!!
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.
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).
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).
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…
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.
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!
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…
I cooked up a fix for ya:
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?
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.
And done! The deploy was completed an hour ago, so the changes should be live on your end by now.
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.
Can you create a separate #feature topic for the new request? So we can close this one off as todone.