#mattwoberts-setup-intents
1 messages · Page 1 of 1 (latest)
- Yes, assuming you passed the
customerparameter when creating the Setup Intent. return_urlis only really useful for that method if you're handling next actions yourself (not recommended).
Right, thanks for this, that makes sense
If it's attached to the customer, will it then be used for future subscription payments, or does it need to be attached to the subscription?
You'd need to set the PM as the default on either the customer or the subscription. Simply saving/attaching to the customer is not enough.
I'd recommend just using this parameter on subscription creation: https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Out of interest, are you using a Setup Intent and then creating a Subscription?
I was - that's what the code does now. But I'm changing it so that I create a subscription, and then create a setupintent after that
Why do you need to do that? The subscription creation flow will handle the setup of the payment method
Because in our app, we start a sub with a free trial, and then during that trial users can enter a card - which we handle as a setup intent.
The subscription with the free trial will likely create and return a Setup Intent for you
Hmm, I didn't know that, but I did read that setup intents are pretty short lived, and you shouldn't keep them hanging around... so you think I can use that setup intent for card entry, even say 20 days into the trial:?
AFAIK, they aren't short lived
Ah OK cool I'll test that.
One final question if you don't mind - I've just updated the .net SDK version we're using, and we've got some code that reads the subscription plan id : "mySub.Plan.Id"
I see though that that has been removed, the subscription object no longer has it's plan.. How do I get the plan id now?
Which version?
Yeah you've likely jumped major versions and breaking changes: https://github.com/stripe/stripe-dotnet/blob/master/CHANGELOG.md#3912---2020-09-01
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for stripe.com. - stripe-dotnet/CHANGELOG.md at master · stripe/stripe-dotnet
😬
The .NET SDK is tightly coupled with the API version
OK thanks, this is going to take some careful poking around 😉
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!