#gracine
1 messages · Page 1 of 1 (latest)
Hi, this is an expected error I'm afraid with subscriptions. Once a subscription or an invoice is created on a customer, they are 'locked' into that currency. The solution here is to create a new customer and ask the customer for their card details again and create the CAD subscription.
I am aware of this restriction but i never set USD on the customer, that is my confusion
all CAD from begining
I don't understand where the USD comes from
It was an issue that I had to overcome and I tought I fixed it by setting the currency on the phase of the sub schedule
It looks like that checkout session is for a different customer, https://dashboard.stripe.com/test/logs/req_MKnC43pQg0wp95: cus_MzkeWLdIlseI01 but it looks like it has been deleted since. The customer mentioned above, https://dashboard.stripe.com/test/customers/cus_MzlFLftj9Fzw0E does have CAD currency.
humm
ok i guess its an error on my end
let me retry this
Ok it was definitely an error on my end, thx for pointing it out
I have a question though, it was actually the origin of all this
I have a user subscribed with a free coupon for 12 months on our premium plan
But he can choose to upgrade to Pro, in that case we will cancel the subscription and create a new one
et go to the stripe checkout session
but when i call the checkoutsession api
i get this :
] This customer has no attached payment source or default payment method. Please consider adding a default payment method
am sorry, not at the checkoutsession call but at the Stripe::Subscription.create call
I am seeking advice: In that case, i should fetch the customer, check if a payment methode is attached, if so, just create a new subscription directly, if not redirect to stripe checkout page ?
would that make sense
No worries.
When the Checkout Session is created, you're not collecting Payment Method and passing this parameter, https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_collection with if_required?
ah ok, so you suggest that I always redirect the user to the checkout page
instead of attempting to create/update the Subscription using the API
i am using if_required already, its just that I was only using the checkout page for the very first subscription
your solution would be more robust i think
I was more asking for clarity. If you intend to have this occurrence more often then I believe that is a good solution.