#riptired_api

1 messages ยท Page 1 of 1 (latest)

vast voidBOT
#

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

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

storm iglooBOT
main meadow
#

HI ๐Ÿ‘‹

Let's break this down piece by piece. What is the webhook event you are starting with?

fiery vapor
#

Hey, since I am monitoring subscription products I am looking at customer.subscription.created for when subscriptions are created and invoice.payment_succeeded to determine that the payment for the subscription is complete and the subscription is now active

main meadow
#

And you want to get down to which Object in the API?

fiery vapor
#

Well I just want to be able to monitor and sort the events based on the product in the subscription

#

Each link that my product team makes is associated with a different client, so I want to be able to tell these X events are for client A while these Y events are for client B

#

each product is associated with a different client, but they are all subscription payment links

main meadow
#

Oh wait

#

No, Payment Links are not designed to be Customer specific

fiery vapor
#

So let me clarify a bit, I have N clients and each client has P customers. The P customers are completing the payment links. Each payment link has a different product (there are N payment links for N clients)

#

I just want to sort the webhook events by the N clients so I know which customer is purchasing the product from which client

main meadow
#

Yeah, that's not how we designed payment links to operate. They were intended to allow quick, anonymous purchases by sharing out a link on, for example, Instagram.

#

As for "sorting" events. I'm not sure what you mean.

#

Both the events you are listening to will have the Price ID that conencts them to a Product

#

It sounds like that is the data you need

fiery vapor
#

is the price ID persistent in all webhook events related to payment links?

#

and can I get the price ID from the dashboard?

main meadow
#

Payment links are generated from Price objects so yes, the same Payment Link will always refer to the same Price ID

fiery vapor
#

Okay so this id "price_1Oqgk9H3HzTQWXXXXXXXXX" will be in all events in a subscription lifecycle

main meadow
#

Specifically, every Subscription or Invoice event that involves that price will have the ID in the items property for Subscriptions and lines property for Invoices

fiery vapor
#

okay I believe that is sufficient since the main events for a subscription lifecycle are invoice and subscription related

#

regarding getting the price ID from the dashboard where is that?

#

I have only been able to find it by going to the webhook events and seeing what it is, but I need to know what the price ID is when the payment link is created

main meadow
#

The Price objecst are nested inside a Product detail page

fiery vapor
#

ah I see

#

great

#

alright that should sort me out then, ill use the price ID to sift events so that I know which customers are making a payment for which product