Gets the latest subscriber info or creates one if it doesn't exist.

📘

Get OR create a subscriber

If the provided app_user_id doesn't exists, a new subscriber will be created with the App User Id.

Response

If the provided app_user_id exists, the response will contain the latest purchase information for that user.

Attribute

Description

request_date

The ISO 8601 datetime of the request.

request_date_ms

The Unix timestamp of the request.

subscriber

A Subscriber object

The Subscriber object:

Attribute

Description

original_app_user_id

The first app user ID that was registered for this user.

original_application_version

Only available on iOS. This will be null until an iOS receipt is sent for the user. After a receipt has been sent, it will indicate the first App Store version of your app that user installed.

original_purchase_date

Only available on iOS. The date that the app was first purchased/downloaded by the user. Will be null if no receipt is recorded for the user. Useful for Migrating Subscriptions.

management_url

URL to manage the active subscription of the user. If the user has an active iOS subscription, this will point to the App Store, if the user has an active Play Store subscription it will point there.

If there are no active subscriptions it will be null.

If the user has multiple active subscriptions for different platforms, this will take the value of the OS in the X-Platform header into consideration:

  • If the request was made on an OS for which there are active subscriptions, this will return the URL for the store that matches the header.
  • If the request was made on a different OS or the OS was not included in the X-Platform header, this will return the URL for the store of the subscription with the farthest future expiration date.

first_seen

The ISO 8601 datetime string corresponding to when this user was first seen in RevenueCat .

last_seen

The ISO 8601 datetime string corresponding to when this user was last seen in RevenueCat.

entitlements

A mapping of Entitlement objects keyed by entitlement ID.

subscriptions

A mapping of Subscription objects keyed by product ID.

non_subscriptions

A mapping of Non-Subscription object arrays keyed by product ID. Non-Subscription Purchases include consumables, non-consumables, and non-renewing subscriptions.

other_purchases

Deprecated. See non_subscriptions

subscriber_attributes

A dictionary of subscriber attribute keys to Subscriber Attribute objects. Only included in requests made with secret keys.

For more details on subscriber attributes, see our Subscriber Attributes guide.

The Entitlement object:

Attribute

Description

expires_date

The ISO 8601 datetime this entitlement is set to expire (may be in the past).

grace_period_expires_date

The ISO 8601 datetime when the grace period for the subscription would expire. Will be null if user if not in a grace period.

purchase_date

The ISO 8601 datetime of the latest purchase or renewal.

product_identifier

The product identifier that unlocked this entitlement.

The Subscription object:

Attribute

Description

expires_date

The ISO 8601 datetime of the latest known expiration date.

purchase_date

The ISO 8601 datetime of the latest purchase or renewal.

original_purchase_date

The ISO 8601 datetime of the first recorded purchase of this product.

ownership_type

Possible values:

  • PURCHASED: The user purchased the product.
  • FAMILY_SHARED: The user has access to the product via their family.

period_type

Possible values for period_type:

  • normal: The product is in it's normal period (default)
  • trial: The product is in a free trial period
  • intro: The product is in an introductory pricing period

store

Possible values for store:

  • app_store: The product was purchased through Apple App Store.
  • mac_app_store: The product was purchased through the Mac App Store.
  • play_store: The product was purchased through the Google Play Store.
  • amazon: The product was purchased through the Amazon Appstore.
  • stripe: The product was purchased through Stripe.
  • promotional: The product was granted via RevenueCat.

is_sandbox

Boolean indicating whether the subscription was purchased in sandbox or production environment.

unsubscribe_detected_at

The ISO 8601 datetime that an unsubscribe was detected. Will be null if previously unsubscribed user has resubscribed. Note the subscription may still be active, check the expires_date attribute.

billing_issues_detected_at

The ISO 8601 datetime that billing issues were detected. Will be null if previous billing issues were resolved. Note the subscription may still be active, check the expires_date attribute.

grace_period_expires_date

The ISO 8601 datetime when the grace period for the subscription would expire. Will be null if user if not in a grace period.

The Non-Subscription object:

Attribute

Description

id

A unique identifier for the transaction. You can use this to ensure you track consumption of all consumable products.

purchase_date

The ISO 8601 datetime that the purchase happened.

store

Possible values for store:

  • app_store: The product was purchased through Apple App Store.
  • mac_app_store: The product was purchased through the Mac App Store.
  • play_store: The product was purchased through the Google Play Store.
  • amazon: The product was purchased through the Amazon Appstore.
  • stripe: The product was purchased through Stripe.

is_sandbox

Boolean indicating whether the subscription was purchased in sandbox or production environment.

The Subscriber Attribute object:

Attribute

Description

value

The string value of the attribute.

updated_at_ms

The Unix timestamp of when the attribute was last updated.

🚧

Secret API Key Required For Subscriber Attributes

The Subscriber Attribute object will only be included in requests made with a secret API key.

Language
Authentication
Header
Click Try It! to start a request and see the response here!