Jump to content
  • 0

Integrating Billing System To Existing Site With Api?


gutterboy

Question

Hello,

 

We have a very basic billing system at the moment built into our current software that basically just sends users an invoice each month so we have been researching either overhauling it ourselves or buying a exisiting solution such as Blesta.

 

Blesta has interested us because it has an API you can work with. Basically before purchasing it, we have some questions:

 

* With the API is it possible to retrieve all the data needed so we can put it all into our own design?

 

* How flexible are the automatic payments? Such as can they be setup via paypal's system using something like this: https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/ht_ec-refTrans-SetEC-DoRefTrans-curl-etc/ - from what I have been told that is how you deal with non-recurring automatic paypal payments.

 

* Can you set it up to send out invoices every month on a certain day and for only accounts above a certain amount owing?

 

* After 21 days we would like to be able to have it automatically send a reminder - can it do this?

 

* I assume we can see users who are say 30 days overude within the admin interface?

 

* We would also like to be able to check somehow if a user is overude "x" amount of days for an invoice so we know if we need to send restrict their ability to do certain things or suspend their account or what not - can we do this?

 

Thanks a lot!

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Yes you can do all of the above except sending invoices etc on a certain day automatically.

 

Thanks for the fast answer. So how does the system know when to send the invoices out? How is that controlled?

 

Also, if we check the system to see how overdue an invoice is, I assume we can also check the amount that is overdu via the API?

Link to comment
Share on other sites

  • 0
Thanks for the fast answer. So how does the system know when to send the invoices out? How is that controlled?

 

Also, if we check the system to see how overdue an invoice is, I assume we can also check the amount that is overdu via the API?

The first invoice is sent out on the next cron, then it's sent out on the set renew date.

I believe you can via the API.

Link to comment
Share on other sites

  • 0

Thanks for the fast answer. So how does the system know when to send the invoices out? How is that controlled?

 

Invoices are sent out X days before a service renews. This value is configurable, so you can invoice someone 5 days before, 10 days, 30 days, etc etc. The due date of the invoice is always the date the service renews.

 

Also, if we check the system to see how overdue an invoice is, I assume we can also check the amount that is overdu via the API?

 

Yes, virtually everything you can do in the interface, you can do via the API. Essentially all public method models are available through the API, including those for plugins.

 

See http://docs.blesta.com/display/dev/API for information on the API. If you scroll to the bottom you'll see source code documentation which you'll need.

Link to comment
Share on other sites

  • 0

Invoices are sent out X days before a service renews. This value is configurable, so you can invoice someone 5 days before, 10 days, 30 days, etc etc. The due date of the invoice is always the date the service renews.

 

Well we don't have a "service" per se. We want to be able to send out invoices every month on say the 1st of the month, but ONLY for accounts that owe say $5.00 or more; so not all users are going to have something to pay each month.

Link to comment
Share on other sites

  • 0

Well we don't have a "service" per se. We want to be able to send out invoices every month on say the 1st of the month, but ONLY for accounts that owe say $5.00 or more; so not all users are going to have something to pay each month.

 

You may wish to use the API to create the invoices on the 1st of the month, each month, based on your other systems evaluation of whether they owe $5 or more. I think this is where you're headed? In this case, the client would have no services in the system, and Blesta would not invoice on its own. Any invoices you create via the API will still work similarly however, with late notices being sent how they are configured, and auto-debit running if configured as well.

Link to comment
Share on other sites

  • 0

You may wish to use the API to create the invoices on the 1st of the month, each month, based on your other systems evaluation of whether they owe $5 or more. I think this is where you're headed? In this case, the client would have no services in the system, and Blesta would not invoice on its own. Any invoices you create via the API will still work similarly however, with late notices being sent how they are configured, and auto-debit running if configured as well.

 

Ok, so I could just send out the invoices needed via calls to the API so that only the users that need to be invoiced for a specific month are invoiced?

 

I'm not quite sure what you meant by the bolded part above however.

Link to comment
Share on other sites

  • 0

Yes. What I meant about late notices and auto-debit is that regardless of how an invoice was created (Automatically by Blesta, manually through the interface, or via the API) the invoice is treated the same way moving forward. There is a feature that can send up to 3 late notices / payment reminders, and a feature that can automatically charge a credit card x days before an invoice is due. These features can still be utilized, if you want, even when creating an invoice via the API.


I mentioned this because in your original post you asked about a reminder.. so, those reminders, if you have them set up, will still be sent when creating an invoice via the API.

Link to comment
Share on other sites

  • 0

I'd actually recommend creating a plugin to do this. Your plugin can create a cron task, and you could have it evaluate if today is the 1st, and if so create your necessary invoices. Your plugin would interact with the API locally, from within the Blesta environment, so it would be more efficient than running a bunch of HTTP API requests.

 

Wow... every time I explain how some part of the plugin system works I'm reminded just how incredibly awesome it is.

Link to comment
Share on other sites

  • 0

I'd actually recommend creating a plugin to do this. Your plugin can create a cron task, and you could have it evaluate if today is the 1st, and if so create your necessary invoices. Your plugin would interact with the API locally, from within the Blesta environment, so it would be more efficient than running a bunch of HTTP API requests.

 

Wow... every time I explain how some part of the plugin system works I'm reminded just how incredibly awesome it is.

 

Thanks...... I will look into that when I get around to it :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...