#appchargeguy

1 messages · Page 1 of 1 (latest)

charred nymphBOT
supple trench
#

When you received payment_intent.succeeded Call a Retrieve Payment Intent API and expand its invoice property. You will receive a full Invoice object. Inside there you may find the property you want

icy walrus
#

it shows "invoice": null,

supple trench
#

You would want to expand

#

Oh

#

How did you create the PaymentIntent?

icy walrus
#

I completed a payment and then listened on payment_intent.succeeded

#

I received the payment intent object and I always get the invoice object as null

supple trench
#

Yeah so that's a standalone PaymentIntent and it doesn't come with an Invoice

#

So there is no Invoice unfortunately

icy walrus
#

ok, so how can i get it?

supple trench
icy walrus
#

but for now I dont want to implement this integration..

#

is there any other way?

supple trench
#

No that's it, any reason you don't want to?

charred nymphBOT
valid basin
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

icy walrus
#

I want to get the details about the invoice that is sent to every buyer. currently, I don't support any integration with invoice, so it requires a lot of effort from my side.
and for now, since I only create a payment intent, then invoice is triggered automatically...

#

can you explain me more about the integration with the invoice...

valid basin
#

Payment Intents don't support invoice generation

icy walrus
#

I'm a bit confused. now, when I create a payment intent, the buyer is redirected to the checkout page, he then completes the payment and the invoice is automatically sent to his email. Finally I get in the code a payment_intent.succeeded event that summarise the transaction

valid basin
#

the invoice is automatically sent to his email
It's likely a receipt, not an invoice

icy walrus
#

ok, I get it, but the receipt is linked to an invoice, right?

valid basin
#

No, not with Payment Intents

#

Can you share an example pi_xxx ID of one of your payments?

icy walrus
#

so why in the email receipt I see both receipt number and invoice number?

#

"id": "pi_3NfPL9GIhFVTvc3Z0W5NvFhn"

#

but this is in test mode..

valid basin
#

Ok, so you are using Checkout with the invoice_creation parameter. So yes, there would be an Invoice generated on payment. However for that example the session/payment is not complete

icy walrus
#

"id": "cs_test_a1U6qEVEw2MSODYhJIHICkYjWYMaY9ZHqb1HdjM8rDsslAR26XxT2YytVh",

#

here is session completed event

valid basin
#

Now help me understand the issue. In the email, there'll be a link your customer(s) can click to download the PDF

#

They aren't attached to the email

icy walrus
#

ok, now I see, there invoice object is attaced to the session completed event and not the payment intent succeeded event

#

I can make an api call to retrieve the invoice object

#

I see that there is a 'reciept_number' property, is this the number that the buyer sees in his email receipt?

#

or a stripe's internal id?

valid basin
icy walrus
#

great and which property in the invoice object represent the value of 'Invoice number'?

valid basin