#neha_docs

1 messages ¡ Page 1 of 1 (latest)

mystic cloudBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1215463985550200924

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

unique sentinelBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

topaz island
#

i guess the status could be trialing. i'm just confused about why the docs make it sound like you have to double check the status after payment

unique sentinelBOT
placid totem
#

Yes you are right, for a trialing subscription, you will also receive an invoice.paid event for a $0 invoice .

#

Thanks for the feedback, I'd let the docs team know.

topaz island
#

so do i need to double check that it's trialing || active

#

or can i just assume it is

#

i guess there's no harm but it's hard to get all this organized so someone else could understand it

placid totem
#

Yes you need to check if it's trialing, or active

topaz island
#

why would invoice.paid be called if it's not trialing or active

placid totem
#

Hmm? Do you have an invoice ID that I can take a look?

topaz island
#

no i don't, i'm redoing my entire stripe setup

#

i was always using sub created/updated/deleted before

#

but now i'm breaking it out more granularly because i have credits i need to allocate to the user

#

so i'm using invoice paid / failed

placid totem
#

Or can you tell me what business problem that you are trying to solve with Stripe API ?

topaz island
#

i had another long thread before about an hour ago

#

checkout.session.completed: used for one-off purchases (topping up credits)
customer.subscription.created: used for one-time set up (storing stripe customer ID in my User table)
customer.subscription.updated: used to perform side-effects related to downgrading
customer.subscription.deleted: used to cancel
invoice.paid: used to create/update subscription and provision credits
invoice.payment_failed: used to perform side-effects related to failed payment

#

this is what i'm doing

#

i just don't get why the docs make it sound like invoice.paid could occur w/o sub status active or trialing

placid totem
#

The docs says "You can provision access to your product when you receive this event and the subscription status is active.", which part of the text make you think that the event will occur without subscription status being active or trialing?

topaz island
#

"when you receive this event and the status is active"

#

it sounds like those are 2 condiitons that need to be met

placid totem
#

Yes you are right, as I mentioned earlier, invoice.paid would also occur when subscription status is trialing