#dogge_pau
1 messages · Page 1 of 1 (latest)
Hi, let me help you with this.
What's not working exactly?
How are you doing it currently?
its an ecommerce website
let me share u code
const session = await stripe.checkout.sessions.create({ shipping_address_collection: { allowed_countries: ["IN"] }, payment_method_types: ["card"], mode: "payment", success_url: process.env.CLIENT_URL + "/success", cancel_url: process.env.CLIENT_URL + "?success=false", line_items: lineItems, metadata: { 'size' : 'M' } });
Where do you expect to receive it?
in stripe dashboard
On which page are you looking exactly?
payments
That page contains PaymentIntents objects, and you are setting the metadata on Checkout Session object.
Use payment_intent_data.metadata for this: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata
then where i should add the custom data
here
const session = await stripe.checkout.sessions.create({ shipping_address_collection: { allowed_countries: ["IN"] }, payment_method_types: ["card"], mode: "payment", success_url: process.env.CLIENT_URL + "/success", cancel_url: process.env.CLIENT_URL + "?success=false", line_items: lineItems, payment_intent_data.metadata: { 'size' : 'M' } });
something like this?
okk thanks
Happy to help.
i am from india and i want to use UPI payment how do i do it?
Do you know if Stripe supports this?
yes they said i have to contact them to enable it first
if u can confirm me if its actually possible that would be really helpful or tell me from where i should confirm it
Try using automatic_payment_methods: { enabled: true } instead of payment_method_types.
okks