#tonz18_webhooks

1 messages ยท Page 1 of 1 (latest)

cursive topazBOT
#

๐Ÿ‘‹ 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/1293900459576266826

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

soft scroll
#

What's the evt_xxx ID of the event?

trail trail
#

"id": "evt_1Q8K8qESSezYwJ0nAciDuB0e",

#

i think its showing 2 lines of product

soft scroll
#

Yes, it's the line item for the unused time (proration) on the old price/produce before the upgrade

#

We credit the customer for the unused time if they upgrade mid cycle

#

The 2nd item has the remaining time in the period on the new price/product (prod_QwIvuu3ObDSTeF)

trail trail
#

ohk, so getting ->lines->data[1] wouldnt be a good idea because it might not have a credit on it

soft scroll
#

Depends what you're trying to do I guess?

trail trail
#

im trying to get the metadata from the active plan

soft scroll
#

Yes then you'd probably want to check for the non-credited item, you can read the lines[data][][proration_details] hash for that. If it's null then it's likely the new plan

trail trail
#

otherwise do i get the product metadata when calling $stripe->subscription->retrieve

soft scroll
trail trail
#

i can expand on the 1 call?

soft scroll
#

On the retrieve call yes

cursive topazBOT
soft scroll
#

'expand' => ['items.data.price.product']

fair anvil
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!