Intro to SubsBase API
One way to integrate your solutions with SubsBase is through APIs. We expose APIs for adding, editing, or assigning customers to plans, as well as adding custom fields to the customer profile.
In addition, SubsBase manages authentication for your subscribers, allowing them to access, edit, pause, or cancel their plans. Every request is associated with an authenticated user, which enables Subsbase's role-based data access rules to dynamically determine different permissions for every object included in their request.
SubsBase APIs are all based on GraphQL. GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data and gives you the power to ask for exactly what they need and nothing more.
Although you can consume our APIs through a RESTful-like POST requests, it is advisable to use a GraphQL client to consume the GraphQL interface. Most widely-used languages have client implementations which you can find here.
The backend integration with SubsBase would normally happen on 2 fronts:
Webhooks provide a way for the SubsBase backend to inform your backend about the different events that would occur on the system. For a webhook to be triggered, it needs to be enabled for the specific event you would want to listen to. More info can be found in the Events & Email Notifications page.
To be able to consume the webhooks you need to make sure to validate the request using your Webhook secret to ensure the authenticity of the request and that it originates from the SubsBase servers. More info can be found in the Webhooks page.
The GraphQL API is available for you to be able to query different info about your clients, plans, invoices etc. and also provides a way to manage your clients whether by editing different
infofields or managing their subscription status.
The starting point of any API "Query" or "Mutation" is authenticating using your API Secret as detailed in the Authentication page.
The base url for the SubsBase API is