#trokiize-subscriptions-webhooks
1 messages · Page 1 of 1 (latest)
Hi 👋 no, webhooks aren't necessary to start creating subscriptions. However, without them it will be more tedious to keep track of the state of your subscriptions.
can you give some examples ?
If a customer's monthly payment is declined 3 months after their subscription starts, and the retry attempts all fail as well, then the subscription may transition to an unpaid state (depending on your account settings) and without webhooks you would need to poll repeatedly to determine whether that happened and if you should stop providing your service.
but the customer subscription list would still be in correct state when calling ?
const subscriptions = await stripe.subscriptions.list({
customer: stripeCustomer.customerId,
status: "all",
expand: ["data.default_payment_method"],
});
also few more questions regarding subscriptions
currently I have subscriptions with free trial and without
When I create a subscription with a free trial I don't need to call on client-side confirmCardPayment, but if the subscription is without free trial I need to call confirmCardPayment ?
Yes it will still be in that list. How frequently are you planning poll that list function to list subscriptions for each of your customers? Depending on the frequency you'll likely want to take our rate limits into account as well:
https://stripe.com/docs/rate-limits
Per user less than 20 times a day, more likely 2-3 times
When I create a subscription with a free trial I don't need to call on client-side confirmCardPayment, but if the subscription is without free trial I need to call confirmCardPayment ?
What integration path are you using for subscriptions? Judging from the question I'm assuming you're going to be using Elements but want to confirm.
Gotcha, so confirmCardPayment is used to finalize a payment. For subscriptions with a trial there is no initial payment, so you don't need to do that. However, you need to make sure the customer has a payment method prepared before the first bill or that payment will fail.