New to RevenueCat?
Welcome! If you're adding subscriptions or other in-app purchases to your app, the RevenueCat SDK will handle most of the heavy-lifting without the need to interact with this API directly.
See our Quickstart for more information on getting started with RevenueCat.
RevenueCat provides a REST API for developers to perform customer and transaction related actions from their own server.
Most of this API is geared toward client usage via RevenueCat’s SDK, but there are various endpoints that can be used for refunding purchases, granting promotional entitlements, and other sensitive actions that can only be done via a Secret API key from your server.
If you’re adding subscriptions or other in-app purchases to your app for the first time or if you don’t have a backend that stores your user’s receipts, you’re probably looking to implement the RevenueCat SDK.
If you want to start migrating your existing users to RevenueCat and you have your user’s receipts stored on your own server, or you want to check subscription status of your users from your own server, the REST API is a great solution.
Authentication for the RevenueCat REST API is achieved by setting the
Authorization header with a valid API key. You'll find two types of API keys in your RevenueCat dashboard: public and secret.
Certain endpoints require secret keys, which should be kept out of any publicly accessible areas such as GitHub, client-side code, and so forth. See our Authentication guide for more information.
Authorization: Bearer YOUR_REVENUECAT_API_KEY
The body of the
POST requests should be encoded in JSON and have the 'Content-Type' header set to 'application/json'.
Encode Your URL Params
For URL params, such as the
app_user_id, make sure you URL encode them before using them.