#0xTypedef
1 messages · Page 1 of 1 (latest)
price_data works as well as if you pre-define a Price and use its Id only in the Checkout Session Creation API
If I make the price in the dashboard, do I have to make one per slider tick?
To avoid that, I should just use price_data right?
If you make the price in dashboard then you can just use its Id here
And yes to avoid creating price on Dashboard you can use price_data here. It will create a price on-the-fly
Thanks
if I change the quantity, does that multiply the price
or the number of subscriptions?
it will multiply the price
Should I pass the full amount or just change the number of quantity?
It's up to you. Either way works but I would put quantity for clarity to your customer
Thanks
How do I get the metadata from checkout session from
const subscriptions = await ctx.stripe.subscriptions.list({
customer: customerId,
status: "active",
});
doesnt seem to be in the response
@upbeat nebula
Let's include expand: ['metadata']
It says This property cannot be expanded, you may try data.metadata instead.
tried it still says This property cannot be expanded
okie let me try
Um I do get the metadata on my response
metadata needs to be a dictionary. I am seeing units here is not key-value
that shouldnt matter with javascript if it has the same key no?
this is the response im getting
okie do you have the request id (req_xxx)?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
req_VxGD14yjIWXgbN
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
This is the request when you created it
And I see the metadata on response
Its not possible to get the session metadata from the subscription that was created by the session?
from this
const subscriptions = await ctx.stripe.subscriptions.list({
customer: customerId,
status: "active",
});
No, because the metadata belongs to the Checkout Session, not the associated Subscription