Get or Create Subscriber

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.

AttributeDescription
request_dateThe ISO 8601 datetime of the request.
request_date_msThe Unix timestamp of the request.
subscriberA Subscriber object

The Subscriber object:

AttributeDescription
original_app_user_idThe first app user ID that was registered for this user.
original_application_versionOnly 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_dateOnly 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_urlURL 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_seenThe ISO 8601 datetime string corresponding to when this user was first seen in RevenueCat .
last_seenThe ISO 8601 datetime string corresponding to when this user was last seen in RevenueCat.
entitlementsA mapping of Entitlement objects keyed by entitlement ID.
subscriptionsA mapping of Subscription objects keyed by product ID.
non_subscriptionsA mapping of Non-Subscription object arrays keyed by product ID. Non-Subscription Purchases include consumables, non-consumables, and non-renewing subscriptions.
other_purchasesDeprecated. See non_subscriptions
subscriber_attributesA 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:

AttributeDescription
expires_dateThe ISO 8601 datetime this entitlement is set to expire (may be in the past).
grace_period_expires_dateThe ISO 8601 datetime when the grace period for the subscription would expire (may be in the past). Will be null if user has never been in a grace period.
purchase_dateThe ISO 8601 datetime of the latest purchase or renewal.
product_identifierThe product identifier that unlocked this entitlement.

The Subscription object:

AttributeDescription
expires_dateThe ISO 8601 datetime of the latest known expiration date.
purchase_dateThe ISO 8601 datetime of the latest purchase or renewal.
original_purchase_dateThe ISO 8601 datetime of the first recorded purchase of this product. This property does not update with renewals or product changes within a subscription group.
ownership_typePossible values:
- PURCHASED: The user purchased the product.
- FAMILY_SHARED: The user has access to the product via their family.
period_typePossible 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
storePossible 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_sandboxBoolean indicating whether the subscription was purchased in sandbox or production environment.
unsubscribe_detected_atThe 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_atThe 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_dateThe ISO 8601 datetime when the grace period for the subscription would expire (may be in the past). Will be null if user has never been in a grace period.
refunded_atThe ISO 8601 datetime when the subscription was refunded.
auto_resume_dateThe ISO 8601 datetime when the subscription will resume after being paused.
store_transaction_idTransaction identifier for the purchase from the store receipt.

The Non-Subscription object:

AttributeDescription
idA unique identifier for the transaction. You can use this to ensure you track consumption of all consumable products.
purchase_dateThe ISO 8601 datetime that the purchase happened.
storePossible 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_sandboxBoolean indicating whether the subscription was purchased in sandbox or production environment.
store_transaction_idTransaction identifier for the purchase from the store receipt.

The Subscriber Attribute object:

AttributeDescription
valueThe string value of the attribute.
updated_at_msThe 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
Authorization
Bearer
auth-scheme