#Hemant - Subscription + Checkout
1 messages ยท Page 1 of 1 (latest)
I am using Java (Spring)
Okay and do you have an event ID for one of those checkout.session.completed events?
Should be there, let me find that out and share
Unfortunately event id didnt get printed but i have the subscription id that came back in the payload. It is "sub_1KRP0ZAEkdu20a8XTPRTQKGC"
You can always find event IDs in your dashboard but I'll see what I can find here
And your problem is that you cannot retrieve the Subscription after the checkout session is completed?
Do you have any checkout session IDs? Going from the subscription is kind of backwards
let me try to find checkout session id
and event id as well
Event Id : evt_1KRPNRAEkdu20a8X6ZVyOKnQ
Okay so in this case you are receiving the subscription ID parameter as part of the object payload. Is there a reason you are not just using that ID to retrieve the Subscription object?
I thought i could avoid another unnecessary call to get Subscription from an id. As it was providing SubscriptionObject as well
Well, without an additional API call, the Subscription object is stale. It no longer represents the truth of your system. Unless you're worried about rate limits I find it hard to understand why this would be an impediment.
I will use it, i was a little worried about the performance of the system. Since this is an asynchronous operation, i am good with it. I will retrieve it by subscription id. Thanks for your help.
I can understand the performance concerns but I also know I've created tons of problems for myself trying to pre-optimize my code before I get everything running. ๐
Very true. Another concern , it says No such subscription: "sub_1KRPS8AEkdu20a8X4YMqI0lf"
this is the subscription id i got from the session only
In this event I see the Subscription ID as sub_1KRPNOAEkdu20a8XZ2WGp8rv. I can confirm this does exist.
This is not for that event but the latest one i created and received this subscription id in the webhooks only.
Do you have the webhook event ID for that one?
I need to step away but my esteemed colleague @urban fern will certainly be able to help clarify your situaiton