#jose-fernndez_error

1 messages · Page 1 of 1 (latest)

cyan thornBOT
#

👋 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/1478041188178198721

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

lucid zealot
#

Hello!

Is it possible to create a Stripe Price that supports multiple currencies, or do I need to create a separate Price object for each currency?

We may have many products, and creating and managing multiple Prices per product (one per currency) could become complex. I’d like to understand the recommended approach for handling this efficiently.

#

Our current integration is implemented using Checkout Sessions. I’m sharing some relevant code snippets below for context.

const customer = await this.stripe.customers.create(
{
email: params.email,
name: params.name,
metadata: params.metadata,
payment_method: params.payment_method,
phone: params.phone,
},
{ idempotencyKey: cust:${params.email} },
);

...

const sessionParams: Stripe.Checkout.SessionCreateParams = {
customer: customerId,
payment_method_types: ['card'],
line_items: [
{
price: priceId,
quantity: 1,
},
],
mode: 'subscription',
success_url: successUrl,
cancel_url: cancelUrl,
subscription_data: {
trial_period_days: trialDays,
},
metadata,
client_reference_id: clientReferenceId,
};

  // Only set allow_promotion_codes if no discounts are provided
  if (discounts && discounts.length > 0) {
    sessionParams.discounts = discounts;
  } else {
    sessionParams.allow_promotion_codes = allowPromotionCodes;
  }

  // Generate idempotency key including the coupon ID if present
  const couponId = discounts?.[0]?.coupon || 'nocoupon';
  const generatedIdempotencyKey = `checkout:${customerId}:${priceId}:${metadata['content_uid'] || 'nometa'}:${couponId}`;

  return await this.stripe.checkout.sessions.create(sessionParams, {
    idempotencyKey: idempotencyKey || generatedIdempotencyKey,
  });

Additionally, I would appreciate your advice on whether there is a better architectural approach to handle this multi-currency subscription scenario.

quasi tiger
#

Hello! Unfortunately we don't support subscriptions of different currencies on one customer. So if the customer has an active EUR or USD subscription, you can only create subscriptions of that currency on the customer. We don't really have a reccommended way around this as far as I am aware, you can create multiple customers on our side to represent one customer on your side but that may be cumbersome and could introduce some confusing limits because certain payment methods would be saved to one half of the customer but not the other.

#

It should be possible to create one Price object that supports multiple currencies, looking for the doc on that.

lucid zealot
#

I still have one question based on the documentation you provided.

Is it possible to create a Price with a base currency (e.g., USD) and have Stripe automatically convert and charge the equivalent amount in other currencies (e.g., EUR, COP) based on real-time exchange rates?

I understand that normally we must define a fixed amount per currency using currency_options, but I’d like to confirm whether Stripe supports dynamic currency conversion at the Price level instead of manually setting each amount.

quasi tiger
lucid zealot
#

I want to clarify something regarding Adaptive Pricing.

From what I understand, Adaptive Pricing allows Stripe to localize and display prices in the customer’s local currency, mainly for payment optimization and local payment methods.

However, our issue is different. We are getting the error:

"You cannot combine currencies on a single customer..."

If a customer already has an active subscription in USD, Stripe does not allow creating another subscription in EUR for the same customer.

Can you confirm whether Adaptive Pricing would actually solve this billing restriction? My understanding is that it only affects how prices are presented, but does not allow multiple active subscription currencies for the same customer.