#Paul Han
1 messages · Page 1 of 1 (latest)
Invoices are built on top of payment intents, so if you need an invoice, just use Invoices instead
You can still use the underlying payment intent to collect payment details if you'd rather do it that way
But also if all you need is a receipt, you can configure that: https://stripe.com/docs/receipts
I'm creating the PaymentIntent via code, the link above seems to be via receiving the payment method first. I'm attaching the user's existing payment method to the PaymentIntent to charge them right away/automatically
Is this also possible with Invoices? When I look at the documentation for creating an invoice, could be that I'm missing something obvious but it doesn't seem like I can attach a specific amount and charge immediately: https://stripe.com/docs/api/invoices/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I'm creating the PaymentIntent via code, the link above seems to be via receiving the payment method first. I'm attaching the user's existing payment method to the PaymentIntent to charge them right away/automatically
This doesn't matter. As long as receipt_email is set you're fine
If all you need an invoice for is the receipt, there's no point in using Invoices really since you can get receipts with payment intents
But if you would like an invoice, then yeah you can use them
Does it not send the email in test mode? I added that field but I never got an email
Yeah we don't send emails in test mode
Called out in that doc
You can manually send them via the dashboard if you want to see what they look like though
Thank you, that is helpful. Is there a way to set a specific amount with invoices?
When creating an invoice that is
You do it through invoice items. See: https://stripe.com/docs/invoicing/integration
ah i see.... thank you very much!