Create invoice and charge customer through API

Is it possible to create an invoice, then immediately bill the customer to a card on file using the API and WePay?

We use Freshbooks now and after years of using them, we can’t do this.

Most billing solutions offer recurring auto-bill but, at least with Freshbooks, the recurring bill must be the same amount each month. In our case, the customer’s bill is a different amount each month depending on usage and such.

Loving what I’m seeing from InvoiceNinja so far and we are about to signup for the Enterprise package. Just need to find better documentation, seems to be scattered all over the place and incomplete. I get that for the open source project but, for the paid version I guess I expect better API docs.

One thing I can’t find so far is how to create an invoice, then add lines items to the invoice and send it. I can create an invoice but that’s as far as I got. Oh well, I guess I’m clouding this post with multiple issues.

Thanks in advance for any help.

Yes, this is supported with the API. You’d want to set auto_bill to true.

https://docs.invoiceninja.com/api.html#options

Thanks for your reply. I’m a little unsure about how/where the stored credit card lives. Does the stored card live/get stored at WePay or whatever processor I use?

How does the card get added to wherever it’s stored?

Thanks again.

The card details are stored by the payment gateway when a client pays for their invoice.

1 Like