Why waste time building your own billing system when you can use SalenGo and get back to what you’d rather be doing?
You can add SalenGo recurring billing to your applications very easily through the SalenGo API.
Set up subscriptions, recurring invoices, monitor payments with a few lines of code.
Managing subscriptions to SalenGo centers around creating recurring profiles. The same functionality available in the web application found on the Invoice tab under the Recurring subtab is available through the SalenGo API.
SalenGo recurring profiles create and send invoices automatically for you so you don’t have to manage them yourself. SalenGo recurring profiles do some interesting tricks:
- Automatically send recurring invoices monthly, yearly, or as little or often as you would like.
- Add or remove line items from a subscription at any time.
- Send invoices by email or through the post.
Setting up a basic subscription
The foundation of all application billing in SalenGo relies on setting up a basic subscription. Follow these simple steps to get started.
- Create a client through
client.svc/create. Store the client_id in the response code.
- Create a recurring profile using
document.svc/recurring/create for the client_id. If you do not specify a date, the first invoice will be date as today.
- Store the client_id and recurring_id with the client record in your own database to make them easy to reference in future API calls.
Getting notified of payment
You can be notified when a payment arrives by registering a Webhook for the
Checking if a client should be suspended
You can determine if a client is in arrears by calling
Invoice/list with their client_id and with the special ‘unpaid’ status filter. If you have a policy of letting clients pay late, you can limit the list to only old unpaid invoices with the
You can also automatically be notified when an account is past due by subscribing to the
invoice/pastdue/3 series of Webhooks.
Suspending and cancelling a subscription
You can suspend a subscription by calling
Recurring/update and setting the stopped field to 1. To resume the subscription, update it and set the stopped field to 0.
To cancel a subscription, delete the recurring profile using
Modified at will
You can modify a SalenGo recurring profile at any time. The next invoice generated will reflect the profile as of the moment it is generated.