#mboras_api
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/1230448693241577512
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- mboras_api, 2 days ago, 11 messages
- mboras_api, 3 days ago, 58 messages
I see invoices in dashboard only for my stripe subscriptions
Hi, let me help you with this.
please
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.
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
You can fetch the Checkout Session object via API and expand the line_items property: https://docs.stripe.com/api/checkout/sessions/list
Alternatively, you can set the payment_intent_data.description when you create a Checkout Session: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-description
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?
Happy to help.