#sayori_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1313954986807525519
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- sayori_best-practices, 1 day ago, 13 messages
๐
A Customer can only have a single credit balance
Based on the currency that is set for the Customer
What are you trying to do here?
Ah. How is currency set for the customer, if they've made no purchases so far?
I want to have an internal tool for our QA team that allows them to purchase a product via Stripe Checkout, but we want to have them test purchasing from different currencies
The currency is set based on the Customer's first Subscription/Invoice unless you set it manually via the Dashboard.
Overall though it doesn't seem like using the Customer credit balance should be relevant here for what you are describing -- that only reduces the amount of a finalized Invoice
Why are you trying to use Credit Balance?
Adjusting Credit Balance seems to allow a customer going through Stripe Checkout to be charged less in cash, based on their credit balance total; if their credit balance is greater than the price of the transaction itself, the customer is not charged at all. That's useful for our QA team running regression tests on production rather than test environment. Is there a better approach?
Are you using Subscription mode Checkout Sessions?
yep
Gotcha then that's why.
But really you shouldn't be testing in live mode at all.
That is what test mode is for...
Regular testing is done on test mode; but we've concluded weekly regression testing is better on a production environment to more closely imitate true user experience, particularly in case developers have made changes to production prices and not to test prices, for example
Okay well I don't recommend this but overall if you want to test in multiple currencies here then you need to create Customer objects in each different currency.
A Customer object can't have a credit balance in multiple currencies nor create Subscriptions in multiple different currencies.
got it. it doesn't seem like there's a way to update the currency on a Customer object, based on the API. is it just an undocumented feature?
or is it something that has to be done through the dashboard?
Correct, you can't update it, but if the Customer does not have an active Subscription in a currency then you can create one in a different currency and the Customer's currency will change accordingly.
I'd assume this won't work if they have a current Credit Balance...
But you'd need to test that
so.... I could zero out their credit balance, make sure they don't have any subscriptions, then create an active subscription (for free i hope) in another currency (EUR), then cancel this active subscription so that now their currency is EUR?
(newly created active subscription cancelled, so that they can test purchasing again via stripe checkout)
Yes that should work as far as I know. But why not just use a different Customer instead?
Just create a Customer for each different currency you want to test.
Hmm. but how do I specify currency when creating a new Customer? Does it infer based on address.country?
Ah I see your point
No, it will always default to your account's default currency.
And you can't set this via the API
So yeah you can't solely do this via the API, however you could go create these different Customer objects via the Dashboard where you can specify their currency
got it, thanks for clearing this up!
Then you can list them via the API and use the relevant Customer object