#jignesh_13529
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- jignesh_13529, 14 minutes ago, 3 messages
- jignesh_13529, 6 hours ago, 12 messages
- jignesh_13529, 5 days ago, 16 messages
👋 happy to help
ok
i want to create invoice and send invoice to my customer and me via email or link after payment done
so the first thing you need to do is to tell the Checkout Session to create the invoice for you https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-invoice_creation
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
second thing, I see you're listening to the payment_intent.succeeded event
instead you should listen to checkout.session.completed
once you receive that event
Ok
you retrieve the session and expand on the invoice object https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-invoice
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
you could then get the invoice_pdf URL from the invoice object https://docs.stripe.com/api/invoices/object#invoice_object-invoice_pdf
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
invoice_creation = true, or i need to pass item data also ?
did you check the link I sent you?
yes
well in that link you can see that the invoice_creation parameter is an object and not a boolean
and you need to pass in enabled: true
ok
'enabled' => true
]```
well you would to implement the download from your end with the URL
is that login required to open invoice pdf url?
no
Ok thanks