#gracine

1 messages · Page 1 of 1 (latest)

deft crystalBOT
sand canyon
#

id of the request : req_B65dADryZTxu2H

#

id of the customer : cus_MzlFLftj9Fzw0E

blissful sorrel
#

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.

sand canyon
#

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

blissful sorrel
sand canyon
#

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

blissful sorrel
sand canyon
#

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

blissful sorrel
#

I was more asking for clarity. If you intend to have this occurrence more often then I believe that is a good solution.

sand canyon
#

ok, but more complicated since I need to handle all corner cases like if payment was not set

#

its not going to happen often

#

thanks for you help