#MarcusStripe
1 messages · Page 1 of 1 (latest)
Can you share the in_xxx ID?
the invocie is still in draft actually
that might be related
what I do - create invovice, add invoice item. and I was told I dont need to send the invoice
how to finalize it?
you can call https://stripe.com/docs/api/invoices/finalize
( it's one of the steps in https://stripe.com/docs/invoicing/integration#create-customer-code )
Thanks.
So, basically, yet another remote call of the stripe api, right?
On a high level, like this:
Invoice invoice = createInvoice(stripeCustomerId);
createInvoiceItem(stripeCustomerId, stripePriceId, units, invoice);
InvoiceFinalizeInvoiceParams params = InvoiceFinalizeInvoiceParams.builder().build();
invoice.finalizeInvoice(params);
return invoice.getId();
yep that's the idea