#gracine
1 messages ยท Page 1 of 1 (latest)
hi! not sure I follow completely, a subscription can not change currency at any point โ it will charge in the currency that corresponds to the Prices you pass in when creating the Subscription and you aren't able to change it to use Prices from other currencies I believe. So I'm not quite sure I follow your case, do you have an example?
Ok, let me explain the use case
we have a classic subscription with free / premium with 4 different currency that you can select (CAD, USD, EUR, GBP)
The price of the premium product has matching 4 currency prices
The Stripe integration is a new feature and is not yet in production
So we have existing users that I need to migrate to Stripe. Currently all users are on a special promo that let them use premium free for 1 year
So I wrote a script using a SubscriptionSchedule, respecting the free promo in the first phase by using a 100% free coupon, the end date of the phase 1 is when the user's account creation date + 12 months ends,
At this point I remove the coupon and they start to pay
my issue is with currency, my script does not have any context so I default to USD
but a user might be in EUR, he does not want to be charged in USD its going to be wierd
my script does not have any context so I default to USD
that's what I don't follow. When you create the Schedule you pass something tophases.items.price, which is a Stripe Price object ID, which has a currency. So you know the currency of the subscription.
Yes the price object is configured with a USD, CAD, EUR and GBP currency
But my script loops on all users and assign this price to a new subscription, I just don't know which currency the user should have
I imagine some kind of scenario where when the payment become past_due (phase 2), I present in the UI a mandatory currency selection screen ?
ah, this multi-currency feature(https://stripe.com/docs/multi-currency-prices) that is new and I don't know well ๐
ahah, yes
ultimately there is a default currency
well, the issue would be somehow the same with 4 different prices with single currency
yes
I default to USD
you do have to pick one
then you're stuck with USD. https://stripe.com/docs/multi-currency-prices#specify-a-currency
ou can also specify a currency on each phase of a subscription schedule. **Subscription schedules are currently restricted to only a single currency across all phases. **
so really sounds to me like you need to decide ahead of time what currency makes sense for the customer when you create the schedule
I would say yes, you do
not sure how else this could work
So the only option for me would be what I mentionned : I imagine some kind of scenario where when the payment become past_due (phase 2), I present in the UI a mandatory currency selection screen, at this point I could update the subscription schedule and change the default USD currency to the one the user have choosen
you can't change the currency on an existing subscription though
ah..
so you can not
create a schedule
schedule create a subscription
some payments on the subscription fail
you handle that and update the currency
that's simply impossible
but could I cancel the subscription (since never really paid/started) and resubscribe to the same price with new currency
maybe you instead cancel the existing subscription when that happens and start or schedule the creation of a new one, but that seems like really the wrong approach and really tricky.
Really the only and best solution here is you know what currency your existing customers want at the point in time when you're doing this migration.
you could but seems incredibly messy and confusing to the customer
If I cancel in advance (still in phase 1), and then update, will the customer be notified ?
because the email notifications are not testable
it really depends on the specifics of the exact schedule
ultimately I think the answer is you need to decide the currency in advance, I can't see any other approach.
ok
thanks
Also 2 small questions
1 - Is there a way to not collect taxes but only for some currencies, we are based in Canada and we do not want to collect taxes for other country it will be too much business overhead for us
(we use the Stripe checkout )
2 - Is there a way that the customer can cancel immediatly using the billing portal ? because when we cancel a yearly plan it waits for the end of the year
Hi! I'm taking over this thread.
1 - Is there a way to not collect taxes but only for some currencies, we are based in Canada and we do not want to collect taxes for other country it will be too much business overhead for us
Are you using Checkout Session withautomatic_tax?
2 - Is there a way that the customer can cancel immediatly using the billing portal ? because when we cancel a yearly plan it waits for the end of the year
You mean for customers to cancel their subscriptions with the portal? Then yes, it's possible as mentioned here https://stripe.com/docs/customer-management#customer-portal-features
For 1, i do not specify it so it should use automatic
for 2, thank you I did not read this
And by the way, I think I found a solution for my initial question (missing currency context in my migration script)
For 1, i do not specify it so it should use automatic
I'm not sure I understand. How are you currently collecting taxes? Can you share an example of a Checkout Session ID?
session_params = {
mode: 'subscription',
payment_method_collection: 'if_required',
# allow_promotion_codes: false,
client_reference_id: user.account.account_id,
currency: @currency,
line_items: [{
quantity: 1,
price: billing_product_price.stripe_id
}],
success_url: Rails.application.config.welcomespaces_uri + "/app/dashboard?has_changed_plan=#{@has_changed_plan}",
cancel_url: Rails.application.config.welcomespaces_uri + '/app-signup/plans?checkout_cancelled=true'
}
after i either specify the customer or customer_email
and then
session = Stripe::Checkout::Session.create(session_params)
this is how I create a checkout session
Got it, so you are not collecting taxes currently?
I am finishing the integration, i am only using test data
Makes sense. So when you want to start collecting taxes, you need to add automatic_tax.enabled: true https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-automatic_tax
so I must specify automatic_tax: true, I
Yes
I tough it was the default
No it isn't.
ok
so I guess since I pass the currency to use from the front end to backend, I could simply set automatic_tax: @currency == 'CAD'
then we will only collect canadian charges
Yes that should work.
ok
Wait, it needs to be automatic_tax: {enabled: true/false}
ah
got it
thx
And to conclude on my original question, missing currency info at my migration script from non stripe user to stripe subscribed customers
What I will do is:
- Subscribe each users to a price in 'USD' with a 100% free coupon applied
Instead of creating a second phase to my SubscriptionSchedule that will remove the coupon
I will set the end_behavior to cancel
the user will because free and will have to register on our subscription page where the currency must be choosen
That would work
Not sure if a subscription schedule is relevant at this point if i have only 1 phase
Not sure if a subscription schedule is relevant at this point if i have only 1 phase
Yes agreed. Just create a regular subscription with a 100% coupon that hasduration: oncehttps://stripe.com/docs/api/coupons/create#create_coupon-duration