I have two payment portals set up
- a custom order form
- wix plans with one off payment
Both of these have been made with code, and they work well. I just wonder how to generate automatic invoices through the wix system. I know that there is a wix-billing API. But are there any code examples on how to combine the two, and how to deal with pending payments that complete later?
Thanks, Michiel
I never saw examples on it or articles other than this section:
https://support.wix.com/en/corvid-by-wix/wix-billing-with-corvid
and this api:
https://www.wix.com/corvid/reference/wix-billing-backend.invoices.html
You can also browse forum to look for posts on the similar matter that can be helpful and give you an idea on how to implement it:
https://www.wix.com/corvid/forum/search/invoices
You can share your experience here on the Forum if you implement a whole invoices system using Corvid so people can follow it in the future 
Thanks for your reply Yevheniia! I haven‘t implemented the link between pay and invoices yet. I’m a bit hesitant to write the code from scratch by myself because of resolving ‘pending payments’ that don‘t complete immediately. I do contribute with other code examples and answers on this forum.
Hello There!
I am building this workflow and I am happy to say I got the system to successfully create the invoices with all the correct data. However, I have a BIG problem at the very end of the chain: When trying to use the createInvoicePreviewUrl( ) or sendInvoice( ) I get an error.
The interesting part is : When I login with admin credentials it works like a charm. Are those 2 functions’s behaviour intended to work this way?? this makes it imposible to send customers the created invoices, which make the whole idea of an API pointless.
Does anybody has tried to do this??
Hi fernandust, I don’t know the answer to your question, however I wondered if/how you account for invoices with pending payments? (these are payments which complete at a later time, so ideally the invoice would be completed when the payment completes)
@verbaldancing Hi there! Out of frustration I decided to go other way and design my own invoices. It’s a lot of work but I think it would be better in the long run. Besides I don’t want to pay for the ascend plans just to remove wix branding. The only thing that bothers me is that there is no simple way to download pdf or print ( or free) invoice.
@fernandust wow, congratulations on getting your own invoicing system! For us it would be good to have the standard Wix Ascend invoices, because we also use the Wix shop which creates automatic ones. Hopefully there will be an example soon on how to do it.