How do you create Stripe Invoices through API

Hi,

I have been working for days on trying to work out the best way to go about accepting payments for my setup. Initial had a custom checkout cart and users entered the credit card details and payment was received through stripe and that process worked (apart from not being able to display errors).

But I stuck! I prefer all payment entry etc to be handles on Stripe side. We have projects that users can pay for, but they need to have an invoice sent to them for tax purposes.

The projects are created dynamically on our DB.

I am thinking now maybe Stripe Invoices is the better way to go for this scenerio?

I have a button on the App front end and links to the stripe Server Action below.
No output is generated and I am not sure why? I have put same data in first for testing.

Can anyone assist and see where I am going wrong?

I have replaced the customer id with a test one on Stripe cus_Lb########.

Community Page
Last updated: