#FallenBlade

1 messages ยท Page 1 of 1 (latest)

smoky sirenBOT
static nimbus
#

Hi ๐Ÿ‘‹ typically you don't. Invoices generate Payment Intents to process the payment associated with the Invoice, so typically you would create the Invoice first and then use its Payment Intent to handle the payment for it.

gaunt sequoia
#

Thanks for your response.
Can you give me an article to implement an invoice for one-time payment and that charge automatically?

I tried creating an invoice but the paymentIntent is null. So, I might missed something.

static nimbus
#

If you haven't yet finalized the Invoice then that is expected.

This is a good entry point to our documentation for working with Invoices. It links to related documents based on whether you're looking for an API-based solution or a no-code option:
https://stripe.com/docs/invoicing

Create and manage invoices for one-time payments with Stripe Invoicing.

gaunt sequoia
static nimbus
#

Yup, to both.

gaunt sequoia
#

Thanks! I'll implement this now.

static nimbus
#

๐Ÿ‘ sounds good, we're here if that process gives you trouble.

gaunt sequoia
#

Is my implementation correct?

  1. Created customer
    2.Created invoice
    3.Created invoiceItems
    4.finalizeInvoice
    5.Use clientsecret to confirmCardPayment
static nimbus
#

Yup, I think that looks like right, is it doing what you're hoping?

gaunt sequoia
#

Yep, I wanted to create an invoice for a one-time payment. Is this invoice will be send automatically to customer email once it is live?

static nimbus
#

I don't believe so. There is a setting that can be enabled here regarding emailing finalized Invoices, but I'm pretty sure that only gets used when collection_method is set to send_invoice.

gaunt sequoia
static nimbus
#

Yes, that section is specifically for one-off Invoices

gaunt sequoia
#

I see, so I'm good. Thank you so much for your help here Toby. I've been cracking my head this past few days on how to create a one-time payment with invoice and customer. I tried looking everywhere how to do it but there's no stripe documentation for it. it only talks about when collection_method is set to send_invoice.

Thanks for your help! I appreciate it.

static nimbus
#

Any time, happy to help!

smoky sirenBOT