#robotuner
1 messages · Page 1 of 1 (latest)
Hi there 👋 I'm not sure what you're referring to when you say "CS0117 is telling me there is not ReturnURL in SessionCreateOptions". Can you elaborate on that a bit? Is that error coming from the Stripe API, or somewhere else?
thats just the dot net build error.
Hm, if you provide a hard coded URL for ReturnUrl, is the error still encountered? Or is it only occurring with the syntax you currently have?
yes, dot net doesn't think there is a ReturnUrl field in SessionCreateOptions. In fact, if I look at class there isn't a ReturnUrl, there is a SuccessUrl, thats why I tried it.
Oh, you're saying the compiler is saying that field doesn't exist on the SessionCreateOptions object? What version of our dotnet library are you currenlty working with?
.NET 7.0
Apologies, I meant which version of our dotnet SDK are you using:
https://github.com/stripe/stripe-dotnet/releases/tag/v42.7.0
Checking here it seems like ReturnUrl has been on that object for about 3 years:
https://github.com/stripe/stripe-dotnet/blob/e63c64b1c59a77b1f4012ad96c7056003046bdc0/src/Stripe.net/Services/BillingPortal/Sessions/SessionCreateOptions.cs#L63
I'm using 42.5, I'll upgrade to 42.7 to see if the makes a difference.
Did not change anything, compiler still doesn't think SessionCreateOptions contains a ReturnUrl
42.5 is new enough that I don't think that would have made a difference here. Are you pulling in the correct type of SessionCreateOptions?
Correct Type? probably not! All I'm doing creating a new SessionCreateOptions object, then trying to set the two values, customer and returnUrl. Are there other types of SessionCreateOptions?
I believe so. So far I'm spotting one for Customer Portal Sessions, Checkout Sessions, Financial Connections Sessions.
https://github.com/stripe/stripe-dotnet/blob/e63c64b1c59a77b1f4012ad96c7056003046bdc0/src/Stripe.net/Services/BillingPortal/Sessions/SessionCreateOptions.cs#L6
https://github.com/stripe/stripe-dotnet/blob/e63c64b1c59a77b1f4012ad96c7056003046bdc0/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs#L9
https://github.com/stripe/stripe-dotnet/blob/e63c64b1c59a77b1f4012ad96c7056003046bdc0/src/Stripe.net/Services/FinancialConnections/Sessions/SessionCreateOptions.cs#L7
so it looks like I've created one for checkout. OK, how do I access the one in FinancialConnections or BillingPortal?
Gotcha, the Billing Portal one is the one you're after when working with the Customer Portal.
Hm, it doesn't look like we have a full end-to-end example of that in dotnet. I was hoping to use that as an example.
Can you share the import line that is currently being used to import SessionCreateOptions? (sorry if my verbiage is off a bit, dotnet is a language I'm less familiar with)
Got it! I needed to add a using statement: using Stripe.BillingPortal at the top of my file. Thanks.
Awesome! Glad to hear you were able to get to the bottom of it!
Stripe tech support is the best I have encountered. Sometimes it just takes talking with someone to make life easier.