#Matt11-Invoice

1 messages · Page 1 of 1 (latest)

astral walrus
#

No, it will be a receipt, but not always an Invoice

#

An Invoice will have a PaymentIntent, but a Payment Intent could be a standalone one without Invoice

thorny storm
#

ok thanks. what's the difference between an invoice and a receipt?

astral walrus
thorny storm
#

so, every time a payment intent is made a receipt is sent to the customer email correct?

astral walrus
thorny storm
#

ok thanks. And is it possible to send manually a receipt for a 0€ amount?

astral walrus
#

You can't have a PaymentIntent with amount = 0

thorny storm
#

The payment intent ok, but I cannot creare a receipt with 0?

#

is there a way to let the payment intent acts like a subscription?
I mean, I saw that with subscription you can have invoices with 0€ after a coupon code application for example

astral walrus
#

Yes, but the $0 Invoice won't generate a PaymentIntent

#

So in Subscription, even when you have a trial period or discount and your amount goes to 0, it comes an $0 Invoice and no PaymentIntent. PaymentIntent only be created when there is actually a transaction

thorny storm
#

I explain what I need to achieve

#

I have the Stripe form that collects the card infos and a coupon code.
After that I call the Stripe APIs to create a payment intent

#

if a customer enters a 100% coupon code the total amount will be 0€, so I can't create a payment intent

#

but I would like to notify the customer that his/her payment I "successful" with a receipt or invoice for example.
Is it possible to achieve?

astral walrus
#

The Stripe form you used to collects the card, what form is that?

#

Normally you would need to create a PaymentIntent beforehand to init a form

thorny storm
#

I use elements

astral walrus
#

You use it with a SetupIntent?

thorny storm
#

nope, with nothing

#

with stripe token

astral walrus
#

Ah ok. I know that integration path. So you have a token and then a source/payment method, correct?

thorny storm
#

yes. with the token I'm going to create a customer and attach to him/her the default payment method

#

later, depending on the amount and the coupon code I decide to create the payment intent and other things on my database

#

when a payment intent with positive amount is created everything is ok because the customer can receive the receipt. But I would like to inform also the 0€ customers

astral walrus
#

So I think you have 2 choices

  1. Don't use Stripe receipt email, just generate an email yourself for $0 PaymentIntent
  2. Instead of just creating a PaymentIntent, create an Invoice which will generate a PaymentIntent. Then you will have a $0 Invoice and an Invoice Receipt
thorny storm
#

So can I generate an invoice of 0€?

#

I think is better to create a custom email for the 0€ receipt

#

otherwise I need to change all my logic, I need to create it, pay it, look for it status. etc

astral walrus
#

So can I generate an invoice of 0€?
Yes
I think is better to create a custom email for the 0€ receipt
Agree!

thorny storm
#

thanks for your time

#

can I ask not to archive this thread?

astral walrus
#

I won't until when I am still around. But even if I need to step out and archive you can ask in the channel to re-open, and my colleague should be able to re-open it!

thorny storm
#

oh ok cool, thanks!

astral walrus
#

no prob!

astral walrus
#

👋 I am stepping down. Feel free to ask in the channel in case you are back