#busy_piglet_71670 - client reference ids via payment links
1 messages · Page 1 of 1 (latest)
The client reference ID is propagted only to the Checkout Session objects, not the subscription
have you checked the session object too?
Can you share an example subscription?
Sure.. here is the subscription link: https://dashboard.stripe.com/test/subscriptions/sub_1NkXdFH62qDcdFTlzkiIG4rG
not sure if you can access this link.
here is the response from API for the subscription.
I don't see session object in the response attached.
You would want to subscribe to these checkout.session.completed events, you can see the client reference ID is there
busy_piglet_71670 - client reference ids via payment links
ok nice... How can I get this session data using API? and looks like they are tied to subscription using "subscription": key
If you don't capture this with those events, you can List the session with the subscription filter/parameter to find the session that's tied to a sub:
https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-subscription
Then you'd get the client refernce id from the returned object (there should only be one in the list)
Thank you for the clarification. I am attempting to retrieve a list of sessions using the .NET API for Stripe. However, I am encountering an issue where the SessionService class doesn't seem to exist in the Stripe library. Here's the code snippet that I've tried:
var options1 = new SessionListOptions
{
Limit = 100,
};
var service = new SessionService();
StripeList<Session> sessions = service.List(options1);
I'm receiving an error message stating, "The type or namespace name 'SessionService' could not be found (are you missing a using directive or an assembly reference?)."
Interestingly, I am able to use the SubscriptionService class without any problems. Is there another library or package that I need to install or include to resolve this issue?
Thank you for your assistance.
What version of the dotnet sdk are you using?
If its old you might need to update for this
I am using latest version : 42.2.0
Yes.. I am also not sure... Despite reinstalling the Stripe API and restarting Visual Studio, I continue to encounter the same issue. The error message remains: "The type or namespace name 'SessionService' could not be found (are you missing a using directive or an assembly reference?)."
Is there anything else you could suggest to resolve this problem?
Thank you for your assistance.
Interesting. Are you able to refer to any Stripe objects? And is this a build error or is it just intellisense but the build still works?