I’m testing InvoiceNinja to create a billing on my application, but got some questions about strange behavior I flagged:
On my app there is no unique e-mail, users will only have unique username. On InvoiceNinja, I can create two clients with same e-mail, but in the purchase page, what is the expected behavior when filling the e-mail ? Only the first one is taken, or there is a way to pass a client_id as url params ?
There is a way to update subscription quantity, instead of switching plan ? I got a plan called “Storage space 1TiB”, and if the user want 10 TiB, my idea is to update the quantity from 1 to 10, didn’t see this option in client portal
I tried using self hosted version v5, and cloud invoicing.co, I can’t answer those questions
Understood, maybe a verification on InvoiceNinja side can be great … to be sure currently, only the first user is selected, if two exists with the same e-mail ?
Got another question: there is a way to use API, to get direct link to client portal (without login required, I want same process, when I click on client actions > Go to client portal, that seems to auto-login with the link) ?
If two clients have the same email address the app assumes they’re the same person. This is useful if you need to create more than one client record. For example, if you need to invoice the client in more than one currency.
If you add ?client_hash=<client.client_hash> to the URL I believe it should bypass the login screen.
There is something I don’t quite understand. Here’s my workflow:
The user creates an account on my app (domain: myapp.mydomain.com) => free account.
When the user wants to upgrade, they click on “Upgrade” in my app, which redirects them to a subscription link (billing.mydomain.com/client/[id/purchase/v3)
The user fills out the form, including credit card and other necessary information.
A webhook callback is triggered in my app to upgrade the user to a premium account upon the plan_paid event.
However, there’s an issue: we can’t identify the user when using the subscription link.
The account_key is always null in the webhook event. It seems we need to update the user and set a custom value called account_key for it to work. However, even with a webhook on the client created event, we only receive client details and not URL parameters.
Using the campaign parameter only works for the recurring_purchase event, not for the plan_paid event. This means the update on my app happens too late, as the user is already redirected by the time we receive this event.
I’ve tried several workflows, but if you have more details on your workflow or an ideal workflow, it would greatly help me understand how to address this issue.