#krisp_best-practices

1 messages · Page 1 of 1 (latest)

spare nacelleBOT
#

👋 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/1371507126433878053

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

vestal sparrow
dark wren
vestal sparrow
#

Should be able to .... but I think we made this harder in our most recent API version, and I'm trying to double check whether that was intentional

dark wren
vestal sparrow
#

Probably not, customer.subscription.updated is triggered whenever a Subscription object is updated, it doesn't correlate with you getting paid like you mentioned in your message.

#

Okay, yes, you can find the related Subscription from the Invoice object (though depending on what you're doing the customer and lines fields may give you the insight you need).

Depending on which version of our API you're using, you'll look at different fields on the Invoice to find the related Subscription.

If you're using an acacia API version, or a version before that, you'll want to reference the subscription field on the Invoice.
For basil versions or newer, you'll want to look at the parent field.

spare nacelleBOT
dark wren
#

Basically what I need is juste the price_id, my backend map it with the correct subscription, is it directly accessible from the invoice (in basil)

tame nest
#

Hi hi! I’m going to be taking over for my colleague here. Give me a minute to read back and understand things.

#

Based on the Subsctiption life cycle, the Invoice-related events are possibly your best bet here.

Question for you though: how are you creating the Subscriptions?

dark wren
tame nest
#

You could just listen to that event assuming your settings will disable the Subscription in that situation, but if an Invoice payment fails and you're not listening to the Invoice- or Charge-related events, you'd never know to be able to ask the Customer to come back and pay for it - or that that needs to be done.

dark wren
tame nest
#

Which part?

tame nest
#

I guess there are two separate parts here:

A) Is the Subscription active, yes or no? and in the latter case,
B) Why is the Subscription not active, and what an be done about it?

Listening to customer.subscription.updated and checking its status will absolutely deal with A.

#

For B, you will need to listen to the Invoice-related events so you can find out why it failed to (re-)become active, and what next steps are required to get your customer paid up.

spare nacelleBOT
dark wren
#

Okay but i can’t let the customer manage this since I enabled customer portal ?

#

Okay but i can’t let the customer manage this since I enabled customer portal ?

long flare
#

Customer's should be able to manage subscriptions via the portal.