#jose-fernndez_docs
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/1264919978214293625
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
what do you mean by "dynamic pricing"?
du you mean not use a price_xxx object when creating the Checkout Session?
if so, then yes it's possible by using price_data: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-price_data
That is, the price can be created when the checkout session is created.
yep, then use price_data as explained just above
ok, a moment
I get the following error:
Received unknown parameter: line_items[0][interval]
code:
{
mode: "subscription",
customer: customerId,
line_items: [
// {
// price: priceId,
// quantity: 1,
// },
{
price_data: {
currency: currency,
unit_amount: amountCommissionInCents,
product: ${contentId},
},
quantity: 1,
},
{
interval: "day",
}
],
/** keys and values required for the movement are sent */
metadata: {
contentId,
movementId
},
/** URL to redirect in case of successful response */
success_url: `${SUCCESS_URL}`,
/** URL to redirect in case of canceled or failed response */
cancel_url: `${CANCEL_URL}`,
subscription_data: {
metadata
},
}
that's normal, that code is wrong.
wow, ok
it should be line_items.price_data.recurring.interval: day https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-price_data-recurring-interval
you forgot the recurring part
Ok, the error did not refer to it, I'll try it
make sure to read carefully the API reference I shared above.
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
Can a customer subscribe to different products with prices in different currencies?
i'm not sure it's possible on the same subscription
but a customer can have multiple subscriptions that's not a problem
would you mind sharing the request ID?
According to the error, I understand that it is not possible. However, the issue arises when a seller operates in USD and the buyer has subscribed to a first product in COP. If I work with the value in COP, the next invoice should reflect the fluctuating value. Is there any alternative for managing a customer with prices in a different currency?
Ok, let me try to recover the request id
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I just want to understand what's happening so I could better advise you here
req_QVwojpbOt4jhqq
taking a look
👀
I have been working with subscriptions from a checkout session. Is it not possible to manage this from the checkout session?
you can't have 2 active subscriptions with different currencies for the same customer
ok