#filopietra
1 messages · Page 1 of 1 (latest)
General practice would be to add multiple events to the same webhook, assuming they're all handled by the same endpoint
What do you mean?
so the webhook URL. Initially bubble provides it with /initialize at the end
but after the data is sent, I have to remove the /initialize
I'm not really sure how that works with Bubble. Generally once you add the new events to the webhook, then it'll start receiving them without any extra configuration from your side
Obviously you need to add your own logic to handle the new events
okay thanks
the only problem is that by adding the new event to the current webhook, it's not getting called
For instance, I updated and then canceled a subscription but the correct event is not here
(sorry not a developer so some terminology might be off)
if I cancel it manually from stripe, the subscription_status gets updated correctly
but if I do it from my application, it doesn't
any other recommendations on how to properly set up this webhook?
Can you share the requestId of this call ?
This event is for subscription updated, I meant the request id of the call you made from your application to cancel the subscription.
Who is the maintainer of that application, if you aren't a developer ?
This?
I am partly the "developer" but since bubble is a low-code tool, I built everything using online resources
No I need the requestId of the API call that canceled the subscription and you didn't receive an event for
so, when I clicked on "cancel subscription" on the customer portal, the subscription got canceled but the wrong event in the webhook got triggered (with the ID I sent above). If I go ahead and force it from Stripe's dashboard, then the correct event gets triggered:
here I tried multiple times
I am tracking the changes on this simple webpage from our app on Bubble
the subscription status always remains active (except when I cancel from Stripe's admin)
Let me do a quick test.
Actually when canceling a Subscription using the customer portal you receive just customer.subscription.updated yes, you'ill have the field cancel_at populated in the update with the date of the cancel action.
but the status is not updated..
so I am unable to display that information in the customer's profile page
In the customer portal are you seeing that the Subscription is canceled ?
You should have something like this
sub_1N4MElCaqB9tXft1J2BCjscK this is the subscription I am testing
yes I do see this
and this on Stripe
so I see that it is set to cancel at the end of the billing cycle
does that mean that until then the status will remain "active" and then switch to "cancelled" after the 5th of June?
Yes
Yes.
is there a way to test this? As in, speed it up so I can check that the status is indeed changing to cancelled
Hi there 👋 jumping in as my teammate needs to step away soon.
Yes, we have Test Clocks where you can create Subscriptions in a sandbox and have the ability to advance time for objects in that sandbox.
https://stripe.com/docs/billing/testing/test-clocks
Awesome! 🥳 glad to hear
while I'm here, is there a way to deploy all of the settings/set ups without re doing everyhting from scratch?
so move from test mode to live mode
for customer portal, pricing tables, products, webhooks etc
I don't think there is a way to copy all of those.
Products can be copied from test to live mode from their dashboard page, but I believe the other components will all need to be recreated.
ah that's not ideal
So then I would have to initialize the webhooks with real transactions
or can I still use a dummy card when Stripe is not on test mode?
Test cards can only be used in test mode.
hmm
there's this doc on how to take webhooks liev but it doesn’t say much about it: https://stripe.com/docs/webhooks/go-live
If I have to create a new production webhook, I would have to run multiple test and "spend" a lot of real moeny
money
what is the best practice here?
The best practice is to thoroughly test in test mode, and then copy the code over to production once you're confident it behaves as you're expecting.
So for this webhook for example, should I just remove the "version-test" part of the URL (which is used for testing in bubble) and copy over the URL to the live mode?
Or do I have to do everything from scratch?
as in, re send the payload etc
I'm not sure, I'm not familiar with how Bubble works. I don't know if they have the concept of test/live environments. If you have a separate live endpoint in Bubble, then you would want to create the webhook endpoint in livemode so that it points to that URL.
I would advise against using your test endpoint for production purposes, as that means you would need to build a new test endpoint if you ever wanted to test out new functionality.
so you recommend having a production webhook set up in test mode on Stripe?
on bubble, if you add /version test right at the beginning of any URL, you will run that page in test mode
No, I recommend having a test endpoint in Bubble that is registered in test mode, then I suggest having a production endpoint that is registered to your Stripe account as a webhook endpoint in live mode. But again, I'm not too familiar with Bubble so this may not be a great approach for what they offer.
Any time!