#kekko7072-subscription

1 messages · Page 1 of 1 (latest)

silk island
#

Hi @paper bridge! What do you mean by "resetted"?

paper bridge
#

i use a subscription with amount for a rent service as bike sharing

#

so the user after the session upload the record of the amount usage

#

using POST /v1/subscription_items/si_sass/usage_records

#

so at the end of the month the usage is resetted in stripe subscription

#

an i want to rest it also in my database

#

but in customer.subscription.updated i don't have this value of amount

silk island
#

Got it! There's no webhook event to know when the usage record is resetted. However it should be reseted when a new billing cycle starts! And you could track that when the event invoice.paid is sent.

paper bridge
#

ok so i sould reset when a invoice.paid ?

#

and another question, when i add a credit card to customer is also updated for the subscription or i should call and endpoint or webhook event

#

and what is the difference between invoice.paid and nvoice.payment_succeeded

silk island
#

ok so i should reset when a invoice.paid ?
The usage record are resetted at the beginning of the new billing cycle. So you can either keep track of when that happens on your end, or use the invoice.paid event yes. If you use invoice.paid , I would recommend to call listUsageRecordSummaries to check if the latest record usage is indeed at zero. https://stripe.com/docs/api/usage_records/subscription_item_summary_list

#

and another question, when i add a credit card to customer is also updated for the subscription or i should call and endpoint or webhook event
Can you clarify the question? I'm not sure to understand

paper bridge
#

if a user edit it's payment method adding a new card

#

and removing another one

#

is automatically updated also in the subscription?

#

and last question, if the user hasn't payed the billing 'invoice.payed' isn't called right?

past lodge