#gauthier_02801

1 messages · Page 1 of 1 (latest)

final bladeBOT
stuck marten
#

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.

feral sail
#

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

stuck marten
#

Gotcha, yeah, that's a good approach then.

feral sail
#

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

stuck marten
feral sail
#

ok i finalize but payment_intent is null again

stuck marten
#

Can you share the ID of the Invoice? Should start with in_

feral sail
#

in_1OeJF0LRE6A9LfWqA4Rwhrs1

stuck marten
#

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.

feral sail
#

Ok thanks you. I also tried to create an invoice item and linked it to my invoice without success

#

ii_1OeILYLRE6A9LfWqQCrunKzY