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.
Records a purchase for a Customer from iOS, Android, Stripe, Roku and Paddle will create a Customer if they don't already exist.
| X-Platform required | string Example: ios The platform this purchase is for. Either |
| 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 (or JWSTransaction for StoreKit2), for Android the receipt token, for Amazon the receipt, for Stripe the subscription ID or the Stripe Checkout Session ID, for Roku the transaction ID, and for Paddle the subscription ID or transaction ID. | ||||||||
| product_id | string The Apple, Google, Amazon, Roku, or Paddle 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. | |||||||||
| |||||||||
{- "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
}
}
}{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}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.
| 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. |
{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Defers the purchase of a Google Subscription to a later date.
| 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. This can be found in RevenueCat's Product catalog -> {Product} -> Subscription Id. |
| expiry_time_ms | integer <int64> 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. Either |
| extend_by_days | integer [ 1 .. 365 ] The number of days to extend the subscription renewal date. Must be between 1 and 365. Either |
{- "expiry_time_ms": 1708417962662,
- "extend_by_days": 30
}{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}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.
| 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 |
{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Cancels a Google subscription.
| 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 |
{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Extends the renewal date of an auto-renewable subscription for up to 90 days for a specific customer.
This uses Apple's Extend a Subscription Renewal Date API.
Requires a v1 Secret API key.
Note: Apple limits subscription extensions to two per year per customer. Apple immediately sends the customer an email notification of the extension.
| app_user_id required | string The App User ID of the Customer. |
| store_transaction_identifier required | string The store transaction identifier of the subscription to extend. Can be original transaction identifier or renewal transaction identifier. Example: 1000000819074923 |
| extend_by_days required | integer [ 1 .. 90 ] The number of days to extend the subscription renewal date. Must be between 1 and 90. |
| extend_reason_code required | integer [ 0 .. 3 ] The reason code for the subscription extension. See Apple's extendReasonCode documentation.
|
{- "extend_by_days": 30,
- "extend_reason_code": 1
}{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Gets the latest Customer Info for the customer with the given App User ID, or creates a new customer if it doesn't exist.
| app_user_id required | string The App User ID used with the mobile SDK. |
| X-Platform | string Example: ios Optionally set the X-Platform header to update the Customer's |
{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}Permanently deletes a customer.
| app_user_id required | string The App User ID of the customer to be deleted (might be an aliased App User ID). |
{- "app_user_id": "XXX-XXXXX-XXXXX-XX",
- "deleted": true
}Attaches attribution data to a subscriber from specific supported networks.
| app_user_id required | string The App User ID of the Customer. |
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:
| ||||
{- "data": {
- "rc_idfa": "string",
- "rc_gps_adid": "string"
}, - "network": "0"
}"{}"Updates attributes for a customer.
| app_user_id required | string The App User ID used with the mobile SDK. |
object | |||||||||
| |||||||||
{- "attributes": {
- "key_name": {
- "value": "string",
- "updated_at_ms": 1709195668093
}
}
}{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Overrides the current Offering for a specific Customer
| 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 |
{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Reset the offering overrides back to the current offering for a specific Customer
| app_user_id required | string The App User ID of the Customer. |
{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Gets the offerings for your app.
| 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. |
| X-Platform | string Example: ios Set the X-Platform header to fetch that platform's packages. Can be |
{- "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"
}
]
}
]
}
}Grants a Customer an entitlement. Does not override or defer a store transaction, applied simultaneously.
| 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. |
| end_time_ms | integer <int64> 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 <int64> Deprecated A Unix epoch in milliseconds used to determine the expiration date, by adding |
{- "start_time_ms": 1709195668093,
- "end_time_ms": 1709196532093
}{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Revokes all granted entitlements for a given entitlement identifier and App User ID.
| 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. |
{- "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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}| request_date | string Date of the request in ISO 8601 format. | ||||||||||||||||||||||
| request_date_ms | integer <int64> 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": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "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",
- "store_transaction_id": 1000000652379790,
- "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",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "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"
}
]
}
]
}