API reference
Mantle’s API, built on a RESTful foundation, features resource-oriented URLs and JSON-based communication for both requests and responses, aligned with standard HTTP protocols and secure authentication via API keys. This setup differentiates between live and test modes, facilitating a secure development lifecycle.
The Mantle API is structured into two main components, each serving distinct purposes:
App API
The Mantle App API is designed to facilitate the integration of Mantle’s subscription management and billing capabilities into your application. It provides a set of endpoints to identify your users, manage billing and send behavioral data to Mantle using usage events.
Core API Coming soon
The Mantle Core API will allow you to access Mantle data and develop custom integrations with Mantle. It will provide a set of APIs to access and manage your Mantle account data such as customers and plans.
Identify
The first step required to leverage the full power of Mantle is to identify your customer to the platform.
Customer
With this API, you can retrieve customer information, subscribe a customer to a plan, cancel an active subscription for a customer, and create usage events for app installations or subscriptions.
Subscriptions
When a customer selects a plan, you can easily create a recurring application charge by leverage the subscriptions API.
Usage events
Track customer app usage by sending usage events with the Mantle API. Used to support more complex billing models, or track user behavior for analytics.
Usage credits
Apply usage credits to your customer's account so they can leverage metered billing without incurring additional costs.
Usage reports
Generate usage reports for your authenticated customer for the specified time period.