#lucasribeiro_
1 messages · Page 1 of 1 (latest)
Hi, let me help you with this.
Could you please share the Invoice/Subscription IDs?
No, in_xxx or sub_xxx
or this one?:
sub_1OeOJtEJpdNLS1lTxHvnhjBu
So what do you want to happen at the end of trial?
I would like the subscription to be 'cancelled/paused' so that I can block the customer's access to the app until they pay.
The status of the Subscription will transfer to past_due: https://stripe.com/docs/api/subscriptions/object#subscription_object-status
You will receive the customer.subscription.updated event.
ok, but at the moment, the testing time has ended, but the subscription remains active (on stripe's dhasboard)
if (relatedSubscription) {
// Atualizar a subscrição existente com os novos dados
await prisma.subscription.update({
where: { id: relatedSubscription?.id },
data: {
subscriptionActive:
subscriptionStatus === 'active' ||
subscriptionStatus === 'trialing',
customer_name: customerName,
customer_phone: customerPhone,
customer_email: customerEmail
}
})
In any case, it was supposed to be false here in 'active'
The invoice will finalize in a few hours and attempt to pay.
Then it will fail and the Subscription status will become past_due.
right, so after the invoice is generated, within an hour or so it changes to 'open' and can be paid. As the customer does not have a payment method, a 'past_due' will appear and the subscription will be cancelled?
Apart from this time when the invoice is being finalized, is there more time before it can be paid or before the subscription remains active until cancelled?
It depends on the settings here: https://dashboard.stripe.com/settings/billing/automatic
ah entendi
sorry hehe
OK, thanks, I think I understood. In fact, the options to cancel the subscription last for at least one day. good. thank you again
Happy to help.