#lucasribeiro_

1 messages · Page 1 of 1 (latest)

covert sundialBOT
fringe remnant
#

Hi, let me help you with this.

#

Could you please share the Invoice/Subscription IDs?

tawdry onyx
#

sure

#

you say the priceid?

fringe remnant
#

No, in_xxx or sub_xxx

tawdry onyx
#

or this one?:
sub_1OeOJtEJpdNLS1lTxHvnhjBu

fringe remnant
#

So what do you want to happen at the end of trial?

tawdry onyx
#

I would like the subscription to be 'cancelled/paused' so that I can block the customer's access to the app until they pay.

fringe remnant
#

You will receive the customer.subscription.updated event.

tawdry onyx
#

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'

fringe remnant
#

The invoice will finalize in a few hours and attempt to pay.

#

Then it will fail and the Subscription status will become past_due.

tawdry onyx
#

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?

fringe remnant
tawdry onyx
#

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

fringe remnant
#

Happy to help.

covert sundialBOT