#mboras_api

1 messages ¡ Page 1 of 1 (latest)

vernal mirageBOT
#

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

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

little fableBOT
#

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.

toxic fjord
#

I see invoices in dashboard only for my stripe subscriptions

woeful sorrel
#

Hi, let me help you with this.

toxic fjord
#

please

woeful sorrel
#

You don't get the Invoice unless you created an Invoice object or used Subscriptions (that create Invoices automatically). One time paymetns via Checkout only produces a PaymentIntent.

toxic fjord
#

how can my client export payments from stripe where I am adding descriptions like this on line_items

const session = await stripe.checkout.sessions.create({
mode: 'payment',
line_items,
success_url: successUrl,
cancel_url: cancelUrl,
locale: 'en',
metadata,
...determineCustomerInfo(customerId, email),
payment_method_types: ['card'],
});

export function generateLineItems(
ticketsData: TempTicket[],
eventName?: string,
purchasedByName?: string | null,
): StripeCheckoutLineItem[] {
console.log({ ticketsData });
const line_items = ticketsData.map(({ name, price, type, email }) => {
console.log({ name, price, type, email });

// Create an object to store the count of each ticket type with proper typing
const typeCount = ticketsData.reduce<{
  [key: string]: number;
}>((acc, { type }) => {
  acc[type] = (acc[type] || 0) + 1;
  return acc;
}, {});
console.log({ typeCount });

return {
  price_data: {
    unit_amount: price * 100,
    currency: 'aud',
    product_data: {
      name: type,
      description: `${eventName || ''} / ${
        typeCount[type]
      } x ${type} / ${purchasedByName || ''}`,
    },
  },
  quantity: 1,
};

});

return line_items;
}

#

when my user do export like this description field is empty

How can I populate it with description of items that are bought in one session

woeful sorrel
toxic fjord
#

const session = await stripe.checkout.sessions.create({
mode: 'payment',
line_items,
success_url: successUrl,
cancel_url: cancelUrl,
payment_intent_data: {
description: 'This',
},

#

this is it?

woeful sorrel
#

Yes

#

But it's best to try for yourself in Test mode.

toxic fjord
#

ok

#

tnx

woeful sorrel
#

Happy to help.

vernal mirageBOT