#mattsulima
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
yes we have test clocks that would let you accomplish this https://stripe.com/docs/billing/testing/test-clocks
Hey, thanks, I am checking test clocks right now, but it seems I am unable to load existing payments, I can create new ones only?
e.g. I created subscription yesterday, is there any way to test this subscription using test clocks?
I mean I need to test subscriptions I created using my api /app. So no new subscriptions I created after adding test clocks but subscriptions I already have
yes that's correct
you'd have to create a test clock then a new customer then a new subscirption
what went wrong?
Well I needed solution i am able to create all from code, then i can open dashboard, click subscription I am interested in and click "update time" or soemthing
Imo it's good idea to consider as new feature, in test mode to be able to use testclocks for existing subscriptions ๐
hey @slow seal , I have other question. I created test clock and subscription. Then I set time and I am listening for webhook events. I am getting charge.succeded (great) but charge doesn't have metadata which usually subscription I am creating has. Any idea how to track payments then?
We discussed this few days ago, I am trackin charges and balance transactions and that's the data I need (+ metadata containing contract ID )
it's something that we have considered in the past and decided not to go through with it unfortunately
So when user is charged I need to get contract, charge and new balance transaction and save it into our accounts balance
subscription's metadata doesn't get passed down to charges
and the event that we recommend you use is invoice.paid rather than charge.succeeded
Okay, I'll look into it then
Isn't invoice.paid event I need to track only? I want to track payment links, captures, refunds, disputes and everything what causes user is being charged or we return money
here's the docs for it https://stripe.com/docs/billing/subscriptions/webhooks
yes you can but I mean for when a subscription is paid the invoice.paid event is better suited than the charge.succeeded
Okay thanks, I'll check this event, you re right, so far I totally ignored invoice.paid event
let me know if you need any more help