#gauthier_02801
1 messages · Page 1 of 1 (latest)
Hi there 👋 can you elaborate a bit on what you mean by "reuse payment_intent"? You wouldn't really do that, the Payment Intent would be for processing the payment of that Invoice, not for reuse.
Were you only creating the Invoice, or did you finalize them as well? I believe it's the finalization that causes the Invoice's Payment Intent to be generated.
I have a marketplace and i use paymentintent api to allow customer pay products. But i need pdf invoice for each transaction (not only receipt pdf). So i want to use api Invoice to create an invoice and according to the doc, this api will auto generate an paymentintent that i can use in my current process
Gotcha, yeah, that's a good approach then.
So i tried to create an invoice as:
stripe.Invoice.create(
customer="cus_Nm0VNezCMDo53i",
payment_settings={'payment_method_types': ['card']},
)
but payment_intent field is null
Can you try finalizing the draft Invoice that the above request would have created?
https://stripe.com/docs/api/invoices/finalize
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 need to get it from the draft state to open
https://stripe.com/docs/invoicing/overview#invoice-statuses
ok i finalize but payment_intent is null again
Can you share the ID of the Invoice? Should start with in_
in_1OeJF0LRE6A9LfWqA4Rwhrs1
It looks like no Invoice Items were included in the Invoice, so it was a $0 Invoice. Those don't generate Payment Intents because there is no payment to process for that amount.