RevenueCat API v1 (1.0)
Download OpenAPI specification:Download
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 Customers' 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 Customers' 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'.
Content-Type: application/json
{
"app_user_id": "user-1456",
"fetch_token": "MQABC...EFH1234="
}
For URL params, such as the app_user_id
, make sure you URL encode them before using them.
Create a Purchase
Records a purchase for a Customer from iOS, Android, or Stripe and will create a Customer if they don't already exist.
Authorizations:
header Parameters
X-Platform required | string Example: ios The platform this purchase is for. Either |
Request Body schema: application/json
app_user_id required | string App User ID of the Customer the receipt is associated with. | ||||||||
fetch_token required | string For iOS, the base64 encoded receipt file, for Android the receipt token, for Amazon the receipt, and for Stripe the subscription ID or the Stripe Checkout Session ID. | ||||||||
product_id | string The Apple, Google, or Amazon product identifier or SKU. Required for Google. | ||||||||
price | number <float> The price of the product. Required if you provide a currency. | ||||||||
currency | string Default: "USD" The currency of the product. The currency must be in ISO 4217 format. Required if you provide a price. | ||||||||
payment_mode | string Optionally used by the iOS SDK to communicate intro pricing periods. Either | ||||||||
introductory_price | number <float> Introductory price paid | ||||||||
is_restore | boolean Deprecated Default: false If true, the fetch token will trigger your configured restore behavior for any other users sharing the same fetch token. | ||||||||
presented_offering_identifier | string Optional. The offering that was presented to the Customer at the time of purchase. This will be attached to any new transactions in this fetch token and will be available in ETL exports and webhooks. This is mostly useful if you're sending fetch tokens from your backend. | ||||||||
object Any Attributes to set on the Customer as a dictionary keyed by the Attribute name. | |||||||||
|
Responses
Request samples
- Payload
{- "app_user_id": "string",
- "fetch_token": "string",
- "product_id": "com.my.product.iap",
- "price": 1.99,
- "currency": "USD",
- "payment_mode": "string",
- "introductory_price": 0.1,
- "is_restore": false,
- "presented_offering_identifier": "string",
- "attributes": {
- "property1": {
- "value": "string",
- "updated_at_ms": 1709195668093
}, - "property2": {
- "value": "string",
- "updated_at_ms": 1709195668093
}
}
}
Response samples
- 200
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Google Play: Refund and Revoke Subscription
Immediately revokes access to a Google Subscription and issues a refund for the last purchase. If you want to refund a one-time Google purchase, see refund a Google purchase.
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
product_identifier required | string The identifier of the product belonging to the subscription that is being revoked. |
Responses
Response samples
- 200
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Google Play: Defer a Subscription
Defers the purchase of a Google Subscription to a later date.
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
product_identifier required | string The identifier of the product belonging to the subscription that is being deferred. |
Request Body schema: application/json
expiry_time_ms required | integer The desired next expiry time to assign to the subscription, in milliseconds since the Epoch. The given time must be later/greater than the current expiry time for the subscription. |
Responses
Request samples
- Payload
{- "expiry_time_ms": 1708417962662
}
Response samples
- 200
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Google Play: Refund and Revoke Purchase
Issues a refund for the most recent purchase of a Google product and revokes access. Works for subscription and non-subscription purchases that occurred in the last 365 days.
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
store_transaction_identifier required | string The identifier of the transaction to refund. Example: GPA.3309-9122-6177-45730 |
Responses
Response samples
- 200
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Google Play: Cancel a Subscription
Cancels a Google subscription.
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
store_transaction_identifier required | string The identifier of the transaction to cancel. Example: GPA.3309-9122-6177-45730 |
Responses
Response samples
- 200
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Get or Create Customer
Gets the latest Customer Info for the customer with the given App User ID, or creates a new customer if it doesn't exist.
Authorizations:
path Parameters
app_user_id required | string The App User ID used with the mobile SDK. |
header Parameters
X-Platform | string Example: ios Optionally set the X-Platform header to update the Customer's |
Responses
Response samples
- 200
- 201
- 400
- 401
{- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
Delete Customer
Permanently deletes a customer.
Authorizations:
path Parameters
app_user_id required | string The App User ID of the customer to be deleted (might be an aliased App User ID). |
Responses
Response samples
- 200
{- "app_user_id": "XXX-XXXXX-XXXXX-XX",
- "deleted": true
}
Add Customer Attribution Data Deprecated
Attaches attribution data to a subscriber from specific supported networks.
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
Request Body schema: application/json
required | object The data returned by the attribution network callbacks. | ||||
| |||||
network required | string Enum: "0" "1" "2" "3" "4" "5" The attribution network the data is coming from:
|
Responses
Request samples
- Payload
{- "data": {
- "rc_idfa": "string",
- "rc_gps_adid": "string"
}, - "network": "0"
}
Response samples
- 200
"{}"
Update Customer Attributes
Updates attributes for a customer.
Authorizations:
path Parameters
app_user_id required | string The App User ID used with the mobile SDK. |
Request Body schema: application/json
object | |||||||||
|
Responses
Request samples
- Payload
{- "attributes": {
- "key_name": {
- "value": "string",
- "updated_at_ms": 1709195668093
}
}
}
Response samples
- 200
- 400
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Override a Customer's Current Offering
Overrides the current Offering for a specific Customer
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
offering_uuid required | string The UUID for the offering you want to set as the override for the Customer. The UUID can be found in the URL of the offering. For example, the offering UUID in https://app.revenuecat.com/apps/abcd1234/offerings/ofrng1234567abc is |
Responses
Response samples
- 201
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Remove a Customer's Current Offering Override
Reset the offering overrides back to the current offering for a specific Customer
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
Responses
Response samples
- 201
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Get Offerings
Gets the offerings for your app.
Authorizations:
path Parameters
app_user_id required | string The App User ID used with the mobile SDK. The App User ID doesn't have to exist for the endpoint to work but it can affect the current offering depending on whether you have any Experiments running or have overridden the current offering for this specific App User ID. |
header Parameters
X-Platform | string Example: ios Set the X-Platform header to fetch that platform's packages. Can be |
Responses
Response samples
- 200
- 400
- 403
{- "value": {
- "current_offering_id": "default",
- "offerings": [
- {
- "description": "The default offering",
- "identifier": "default",
- "packages": [
- {
- "identifier": "$rc_monthly",
- "platform_product_identifier": "monthly_free_trial"
}, - {
- "identifier": "consumable",
- "platform_product_identifier": "consumable1"
}, - {
- "identifier": "$rc_annual",
- "platform_product_identifier": "yearly_free_trial"
}
]
}, - {
- "description": "The sale offeringg",
- "identifier": "sale_offering",
- "packages": [
- {
- "identifier": "$rc_monthly",
- "platform_product_identifier": "monthly_free_trial_sale"
}, - {
- "identifier": "consumable",
- "platform_product_identifier": "consumable1_sale"
}, - {
- "identifier": "$rc_annual",
- "platform_product_identifier": "yearly_free_trial_sale"
}
]
}
]
}
}
Grant an Entitlement
Grants a Customer an entitlement. Does not override or defer a store transaction, applied simultaneously.
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
entitlement_identifier required | string The identifier for the entitlement you want to grant to the Customer. |
Request Body schema: application/json
end_time_ms | integer A Unix epoch in milliseconds for when the entitlement should expire. The entitlement will always be granted immediately. If not provided then |
duration | string Deprecated Enum: "daily" "three_day" "weekly" "two_week" "monthly" "two_month" "three_month" "six_month" "yearly" "lifetime" How long of a duration to grant the entitlement for. If not provided then |
start_time_ms | integer Deprecated A Unix epoch in milliseconds used to determine the expiration date, by adding |
Responses
Request samples
- Payload
{- "start_time_ms": 1709195668093,
- "end_time_ms": 1709196532093
}
Response samples
- 201
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
Revoke Granted Entitlements
Revokes all granted entitlements for a given entitlement identifier and App User ID.
Authorizations:
path Parameters
app_user_id required | string The App User ID of the Customer. |
entitlement_identifier required | string The identifier for the entitlement you want to revoke from the Customer. |
Responses
Response samples
- 200
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
}
request_date | string Date of the request in ISO 8601 format. | ||||||||||||||||||||||
request_date_ms | integer Date of the request in milliseconds since Epoch. | ||||||||||||||||||||||
object Information about the Customer. | |||||||||||||||||||||||
|
{- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "unsubscribe_detected_at": null
}
}
}
}
current_offering_id | string The identifier of the current Offering for this Customer. Targeting, Offering overrides, and Experiments affect this identifier depending on the App User ID. | ||||||
Array of objects A list of available Offerings. | |||||||
Array
|
{- "current_offering_id": "default",
- "offerings": [
- {
- "description": "The default offering",
- "identifier": "default",
- "packages": [
- {
- "identifier": "$rc_monthly",
- "platform_product_identifier": "monthly_free_trial"
}, - {
- "identifier": "consumable",
- "platform_product_identifier": "consumable1"
}, - {
- "identifier": "$rc_annual",
- "platform_product_identifier": "yearly_free_trial"
}
]
}, - {
- "description": "The sale offeringg",
- "identifier": "sale_offering",
- "packages": [
- {
- "identifier": "$rc_monthly",
- "platform_product_identifier": "monthly_free_trial_sale"
}, - {
- "identifier": "consumable",
- "platform_product_identifier": "consumable1_sale"
}, - {
- "identifier": "$rc_annual",
- "platform_product_identifier": "yearly_free_trial_sale"
}
]
}
]
}