# RevenueCat (/integrations/revenuecat)





{/* MANUAL-CONTENT-START:intro */}

Use [RevenueCat](https://www.revenuecat.com/) in Sim to retrieve subscriber data, manage entitlements and offerings, record purchases, update subscriber attributes, and manage Google Play subscription billing.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Manage subscribers, entitlements, offerings, and Google Play subscriptions. Retrieve customer subscription status, grant or revoke promotional entitlements, record purchases, update subscriber attributes, and manage Google Play subscription billing.

## Actions [#actions]

### RevenueCat Get Customer [#revenuecat-get-customer]

Retrieve subscriber information by app user ID

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat secret API key (sk\_...) |
  | `appUserId` | string | Yes | The app user ID of the subscriber |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `subscriber` | object | RevenueCat subscriber object |
  | ↳ `first_seen` | string | ISO 8601 date when subscriber was first seen |
  | ↳ `last_seen` | string | ISO 8601 date when subscriber was last seen |
  | ↳ `original_app_user_id` | string | Original app user ID |
  | ↳ `original_application_version` | string | iOS only. First App Store version of your app the customer installed |
  | ↳ `original_purchase_date` | string | iOS only. Date the app was first purchased/downloaded |
  | ↳ `management_url` | string | URL for managing the subscriber subscriptions |
  | ↳ `subscriptions` | object | Map of product identifiers to subscription objects |
  | ↳ `store_transaction_id` | string | Store transaction identifier |
  | ↳ `original_transaction_id` | string | Original transaction identifier |
  | ↳ `purchase_date` | string | ISO 8601 purchase date |
  | ↳ `original_purchase_date` | string | ISO 8601 date of the original purchase |
  | ↳ `expires_date` | string | ISO 8601 expiration date |
  | ↳ `is_sandbox` | boolean | Whether this is a sandbox purchase |
  | ↳ `unsubscribe_detected_at` | string | ISO 8601 date when unsubscribe was detected |
  | ↳ `billing_issues_detected_at` | string | ISO 8601 date when billing issues were detected |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `ownership_type` | string | Ownership type (purchased, family\_shared) |
  | ↳ `period_type` | string | Period type (normal, trial, intro, promotional, prepaid) |
  | ↳ `store` | string | Store the subscription was purchased from (app\_store, play\_store, stripe, etc.) |
  | ↳ `refunded_at` | string | ISO 8601 date when subscription was refunded |
  | ↳ `auto_resume_date` | string | ISO 8601 date when a paused subscription will auto-resume |
  | ↳ `product_plan_identifier` | string | Google Play base plan identifier (for products set up after Feb 2023) |
  | ↳ `entitlements` | object | Map of entitlement identifiers to entitlement objects |
  | ↳ `expires_date` | string | ISO 8601 expiration date (null for non-expiring entitlements) |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `product_identifier` | string | Product identifier |
  | ↳ `purchase_date` | string | ISO 8601 date of the latest purchase or renewal |
  | ↳ `non_subscriptions` | object | Map of non-subscription product identifiers to arrays of purchase objects |
  | ↳ `other_purchases` | object | Other purchases attached to the subscriber |
  | ↳ `subscriber_attributes` | object | Custom attributes set on the subscriber. Only returned when using a secret API key |
  | `metadata` | object | Subscriber summary metadata |
  | ↳ `app_user_id` | string | The app user ID |
  | ↳ `first_seen` | string | ISO 8601 date when the subscriber was first seen |
  | ↳ `active_entitlements` | number | Number of active entitlements |
  | ↳ `active_subscriptions` | number | Number of active subscriptions |
</ReferenceDetails>

### RevenueCat Delete Customer [#revenuecat-delete-customer]

Permanently delete a subscriber and all associated data

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat secret API key (sk\_...) |
  | `appUserId` | string | Yes | The app user ID of the subscriber to delete |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `deleted` | boolean | Whether the subscriber was deleted |
  | `app_user_id` | string | The deleted app user ID |
</ReferenceDetails>

### RevenueCat Create Purchase [#revenuecat-create-purchase]

Record a purchase (receipt) for a subscriber via the REST API

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat API key (public or secret) |
  | `appUserId` | string | Yes | The app user ID of the subscriber |
  | `fetchToken` | string | Yes | For iOS, the base64-encoded receipt (or JWSTransaction for StoreKit2); for Android the purchase token; for Amazon the receipt; for Stripe the subscription ID or Checkout Session ID; for Roku the transaction ID; for Paddle the subscription ID or transaction ID |
  | `productId` | string | No | Apple, Google, Amazon, Roku, or Paddle product identifier or SKU. Required for Google. |
  | `price` | number | No | Price of the product. Required if you provide a currency. |
  | `currency` | string | No | ISO 4217 currency code (e.g., USD, EUR). Required if you provide a price. |
  | `isRestore` | boolean | No | Deprecated. Triggers configured restore behavior for shared fetch tokens. |
  | `presentedOfferingIdentifier` | string | No | Identifier of the offering presented to the customer at the time of purchase. Attached to new transactions in this fetch token and exposed in ETL exports and webhooks. |
  | `paymentMode` | string | No | Payment mode for the introductory period. One of: pay\_as\_you\_go, pay\_up\_front, free\_trial. Defaults to free\_trial when an introductory period is detected and no value is provided. |
  | `introductoryPrice` | number | No | Introductory price paid (if any). |
  | `attributes` | json | No | JSON object of subscriber attributes to set alongside the purchase. Each key maps to \{"value": string, "updated\_at\_ms": number}. |
  | `updatedAtMs` | number | No | UNIX epoch in milliseconds used to resolve attribute conflicts at the request level. |
  | `platform` | string | Yes | Platform of the purchase. One of: ios, android, amazon, macos, uikitformac, stripe, roku, paddle. Sent as the X-Platform header (required by RevenueCat). |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `customer` | object | Customer object returned at the top level of POST /v1/receipts (first\_seen, last\_seen, original\_app\_user\_id, original\_application\_version, original\_sdk\_version, management\_url, entitlements, original\_purchase\_date, request\_date). Null when the response uses the `value`-wrapped envelope. |
  | `subscriber` | object | RevenueCat subscriber object |
  | ↳ `first_seen` | string | ISO 8601 date when subscriber was first seen |
  | ↳ `last_seen` | string | ISO 8601 date when subscriber was last seen |
  | ↳ `original_app_user_id` | string | Original app user ID |
  | ↳ `original_application_version` | string | iOS only. First App Store version of your app the customer installed |
  | ↳ `original_purchase_date` | string | iOS only. Date the app was first purchased/downloaded |
  | ↳ `management_url` | string | URL for managing the subscriber subscriptions |
  | ↳ `subscriptions` | object | Map of product identifiers to subscription objects |
  | ↳ `store_transaction_id` | string | Store transaction identifier |
  | ↳ `original_transaction_id` | string | Original transaction identifier |
  | ↳ `purchase_date` | string | ISO 8601 purchase date |
  | ↳ `original_purchase_date` | string | ISO 8601 date of the original purchase |
  | ↳ `expires_date` | string | ISO 8601 expiration date |
  | ↳ `is_sandbox` | boolean | Whether this is a sandbox purchase |
  | ↳ `unsubscribe_detected_at` | string | ISO 8601 date when unsubscribe was detected |
  | ↳ `billing_issues_detected_at` | string | ISO 8601 date when billing issues were detected |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `ownership_type` | string | Ownership type (purchased, family\_shared) |
  | ↳ `period_type` | string | Period type (normal, trial, intro, promotional, prepaid) |
  | ↳ `store` | string | Store the subscription was purchased from (app\_store, play\_store, stripe, etc.) |
  | ↳ `refunded_at` | string | ISO 8601 date when subscription was refunded |
  | ↳ `auto_resume_date` | string | ISO 8601 date when a paused subscription will auto-resume |
  | ↳ `product_plan_identifier` | string | Google Play base plan identifier (for products set up after Feb 2023) |
  | ↳ `entitlements` | object | Map of entitlement identifiers to entitlement objects |
  | ↳ `expires_date` | string | ISO 8601 expiration date (null for non-expiring entitlements) |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `product_identifier` | string | Product identifier |
  | ↳ `purchase_date` | string | ISO 8601 date of the latest purchase or renewal |
  | ↳ `non_subscriptions` | object | Map of non-subscription product identifiers to arrays of purchase objects |
  | ↳ `other_purchases` | object | Other purchases attached to the subscriber |
  | ↳ `subscriber_attributes` | object | Custom attributes set on the subscriber. Only returned when using a secret API key |
</ReferenceDetails>

### RevenueCat Grant Entitlement [#revenuecat-grant-entitlement]

Grant a promotional entitlement to a subscriber

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat secret API key (sk\_...) |
  | `appUserId` | string | Yes | The app user ID of the subscriber |
  | `entitlementIdentifier` | string | Yes | The entitlement identifier to grant |
  | `duration` | string | No | Deprecated. Duration of the entitlement. Provide either duration or endTimeMs (endTimeMs preferred). One of: daily, three\_day, weekly, two\_week, monthly, two\_month, three\_month, six\_month, yearly, lifetime |
  | `endTimeMs` | number | No | Absolute end time in milliseconds since Unix epoch. Use instead of duration to grant the entitlement until a specific timestamp. |
  | `startTimeMs` | number | No | Deprecated. Optional start time in milliseconds since Unix epoch, used with duration to determine expiration. Regardless of value, the entitlement is always granted immediately. |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `subscriber` | object | RevenueCat subscriber object |
  | ↳ `first_seen` | string | ISO 8601 date when subscriber was first seen |
  | ↳ `last_seen` | string | ISO 8601 date when subscriber was last seen |
  | ↳ `original_app_user_id` | string | Original app user ID |
  | ↳ `original_application_version` | string | iOS only. First App Store version of your app the customer installed |
  | ↳ `original_purchase_date` | string | iOS only. Date the app was first purchased/downloaded |
  | ↳ `management_url` | string | URL for managing the subscriber subscriptions |
  | ↳ `subscriptions` | object | Map of product identifiers to subscription objects |
  | ↳ `store_transaction_id` | string | Store transaction identifier |
  | ↳ `original_transaction_id` | string | Original transaction identifier |
  | ↳ `purchase_date` | string | ISO 8601 purchase date |
  | ↳ `original_purchase_date` | string | ISO 8601 date of the original purchase |
  | ↳ `expires_date` | string | ISO 8601 expiration date |
  | ↳ `is_sandbox` | boolean | Whether this is a sandbox purchase |
  | ↳ `unsubscribe_detected_at` | string | ISO 8601 date when unsubscribe was detected |
  | ↳ `billing_issues_detected_at` | string | ISO 8601 date when billing issues were detected |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `ownership_type` | string | Ownership type (purchased, family\_shared) |
  | ↳ `period_type` | string | Period type (normal, trial, intro, promotional, prepaid) |
  | ↳ `store` | string | Store the subscription was purchased from (app\_store, play\_store, stripe, etc.) |
  | ↳ `refunded_at` | string | ISO 8601 date when subscription was refunded |
  | ↳ `auto_resume_date` | string | ISO 8601 date when a paused subscription will auto-resume |
  | ↳ `product_plan_identifier` | string | Google Play base plan identifier (for products set up after Feb 2023) |
  | ↳ `entitlements` | object | Map of entitlement identifiers to entitlement objects |
  | ↳ `expires_date` | string | ISO 8601 expiration date (null for non-expiring entitlements) |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `product_identifier` | string | Product identifier |
  | ↳ `purchase_date` | string | ISO 8601 date of the latest purchase or renewal |
  | ↳ `non_subscriptions` | object | Map of non-subscription product identifiers to arrays of purchase objects |
  | ↳ `other_purchases` | object | Other purchases attached to the subscriber |
  | ↳ `subscriber_attributes` | object | Custom attributes set on the subscriber. Only returned when using a secret API key |
</ReferenceDetails>

### RevenueCat Revoke Entitlement [#revenuecat-revoke-entitlement]

Revoke all promotional entitlements for a specific entitlement identifier

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat secret API key (sk\_...) |
  | `appUserId` | string | Yes | The app user ID of the subscriber |
  | `entitlementIdentifier` | string | Yes | The entitlement identifier to revoke |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `subscriber` | object | RevenueCat subscriber object |
  | ↳ `first_seen` | string | ISO 8601 date when subscriber was first seen |
  | ↳ `last_seen` | string | ISO 8601 date when subscriber was last seen |
  | ↳ `original_app_user_id` | string | Original app user ID |
  | ↳ `original_application_version` | string | iOS only. First App Store version of your app the customer installed |
  | ↳ `original_purchase_date` | string | iOS only. Date the app was first purchased/downloaded |
  | ↳ `management_url` | string | URL for managing the subscriber subscriptions |
  | ↳ `subscriptions` | object | Map of product identifiers to subscription objects |
  | ↳ `store_transaction_id` | string | Store transaction identifier |
  | ↳ `original_transaction_id` | string | Original transaction identifier |
  | ↳ `purchase_date` | string | ISO 8601 purchase date |
  | ↳ `original_purchase_date` | string | ISO 8601 date of the original purchase |
  | ↳ `expires_date` | string | ISO 8601 expiration date |
  | ↳ `is_sandbox` | boolean | Whether this is a sandbox purchase |
  | ↳ `unsubscribe_detected_at` | string | ISO 8601 date when unsubscribe was detected |
  | ↳ `billing_issues_detected_at` | string | ISO 8601 date when billing issues were detected |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `ownership_type` | string | Ownership type (purchased, family\_shared) |
  | ↳ `period_type` | string | Period type (normal, trial, intro, promotional, prepaid) |
  | ↳ `store` | string | Store the subscription was purchased from (app\_store, play\_store, stripe, etc.) |
  | ↳ `refunded_at` | string | ISO 8601 date when subscription was refunded |
  | ↳ `auto_resume_date` | string | ISO 8601 date when a paused subscription will auto-resume |
  | ↳ `product_plan_identifier` | string | Google Play base plan identifier (for products set up after Feb 2023) |
  | ↳ `entitlements` | object | Map of entitlement identifiers to entitlement objects |
  | ↳ `expires_date` | string | ISO 8601 expiration date (null for non-expiring entitlements) |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `product_identifier` | string | Product identifier |
  | ↳ `purchase_date` | string | ISO 8601 date of the latest purchase or renewal |
  | ↳ `non_subscriptions` | object | Map of non-subscription product identifiers to arrays of purchase objects |
  | ↳ `other_purchases` | object | Other purchases attached to the subscriber |
  | ↳ `subscriber_attributes` | object | Custom attributes set on the subscriber. Only returned when using a secret API key |
</ReferenceDetails>

### RevenueCat List Offerings [#revenuecat-list-offerings]

List all offerings configured for the project

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat API key |
  | `appUserId` | string | Yes | An app user ID to retrieve offerings for |
  | `platform` | string | No | X-Platform header value. One of: ios, android, amazon, stripe, roku, paddle. Required when using a legacy public API key; ignored with app-specific API keys. |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `current_offering_id` | string | The identifier of the current offering |
  | `offerings` | array | List of offerings |
  | ↳ `identifier` | string | Offering identifier |
  | ↳ `description` | string | Offering description |
  | ↳ `packages` | array | List of packages in the offering |
  | ↳ `identifier` | string | Package identifier |
  | ↳ `platform_product_identifier` | string | Platform-specific product identifier |
  | `metadata` | object | Offerings metadata |
  | ↳ `count` | number | Number of offerings returned |
  | ↳ `current_offering_id` | string | Current offering identifier |
</ReferenceDetails>

### RevenueCat Update Subscriber Attributes [#revenuecat-update-subscriber-attributes]

Update custom subscriber attributes (e.g., $email, $displayName, or custom key-value pairs)

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat secret API key (sk\_...) |
  | `appUserId` | string | Yes | The app user ID of the subscriber |
  | `attributes` | json | Yes | JSON object of attributes to set. Each key maps to an object with "value" (string; null or empty deletes the attribute) and "updated\_at\_ms" (Unix epoch ms used for conflict resolution — required). Example: \{"$email": \{"value": "[user@example.com](mailto:user@example.com)", "updated\_at\_ms": 1709195668093}} |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `updated` | boolean | Whether the subscriber attributes were successfully updated |
  | `app_user_id` | string | The app user ID of the updated subscriber |
</ReferenceDetails>

### RevenueCat Defer Google Subscription [#revenuecat-defer-google-subscription]

Defer a Google Play subscription by extending its billing date by a number of days (Google Play only)

<ReferenceDetails>
  #### Input [#input-7]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat secret API key (sk\_...) |
  | `appUserId` | string | Yes | The app user ID of the subscriber |
  | `productId` | string | Yes | The Google Play product identifier of the subscription to defer (use the part before the colon for products set up after Feb 2023) |
  | `extendByDays` | number | No | Number of days to extend the subscription by (1-365). Provide either extendByDays or expiryTimeMs. |
  | `expiryTimeMs` | number | No | Absolute new expiry time in milliseconds since Unix epoch. Use instead of extendByDays to set an exact expiry. |

  #### Output [#output-7]

  | Parameter | Type | Description |
  | - | - | - |
  | `subscriber` | object | RevenueCat subscriber object |
  | ↳ `first_seen` | string | ISO 8601 date when subscriber was first seen |
  | ↳ `last_seen` | string | ISO 8601 date when subscriber was last seen |
  | ↳ `original_app_user_id` | string | Original app user ID |
  | ↳ `original_application_version` | string | iOS only. First App Store version of your app the customer installed |
  | ↳ `original_purchase_date` | string | iOS only. Date the app was first purchased/downloaded |
  | ↳ `management_url` | string | URL for managing the subscriber subscriptions |
  | ↳ `subscriptions` | object | Map of product identifiers to subscription objects |
  | ↳ `store_transaction_id` | string | Store transaction identifier |
  | ↳ `original_transaction_id` | string | Original transaction identifier |
  | ↳ `purchase_date` | string | ISO 8601 purchase date |
  | ↳ `original_purchase_date` | string | ISO 8601 date of the original purchase |
  | ↳ `expires_date` | string | ISO 8601 expiration date |
  | ↳ `is_sandbox` | boolean | Whether this is a sandbox purchase |
  | ↳ `unsubscribe_detected_at` | string | ISO 8601 date when unsubscribe was detected |
  | ↳ `billing_issues_detected_at` | string | ISO 8601 date when billing issues were detected |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `ownership_type` | string | Ownership type (purchased, family\_shared) |
  | ↳ `period_type` | string | Period type (normal, trial, intro, promotional, prepaid) |
  | ↳ `store` | string | Store the subscription was purchased from (app\_store, play\_store, stripe, etc.) |
  | ↳ `refunded_at` | string | ISO 8601 date when subscription was refunded |
  | ↳ `auto_resume_date` | string | ISO 8601 date when a paused subscription will auto-resume |
  | ↳ `product_plan_identifier` | string | Google Play base plan identifier (for products set up after Feb 2023) |
  | ↳ `entitlements` | object | Map of entitlement identifiers to entitlement objects |
  | ↳ `expires_date` | string | ISO 8601 expiration date (null for non-expiring entitlements) |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `product_identifier` | string | Product identifier |
  | ↳ `purchase_date` | string | ISO 8601 date of the latest purchase or renewal |
  | ↳ `non_subscriptions` | object | Map of non-subscription product identifiers to arrays of purchase objects |
  | ↳ `other_purchases` | object | Other purchases attached to the subscriber |
  | ↳ `subscriber_attributes` | object | Custom attributes set on the subscriber. Only returned when using a secret API key |
</ReferenceDetails>

### RevenueCat Refund Google Subscription [#revenuecat-refund-google-subscription]

Refund a specific store transaction by its store transaction identifier and revoke access (subscription or non-subscription, last 365 days)

<ReferenceDetails>
  #### Input [#input-8]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat secret API key (sk\_...) |
  | `appUserId` | string | Yes | The app user ID of the subscriber |
  | `storeTransactionId` | string | Yes | The store transaction identifier of the purchase to refund (e.g., GPA.3309-9122-6177-45730 for Google Play) |

  #### Output [#output-8]

  | Parameter | Type | Description |
  | - | - | - |
  | `subscriber` | object | RevenueCat subscriber object |
  | ↳ `first_seen` | string | ISO 8601 date when subscriber was first seen |
  | ↳ `last_seen` | string | ISO 8601 date when subscriber was last seen |
  | ↳ `original_app_user_id` | string | Original app user ID |
  | ↳ `original_application_version` | string | iOS only. First App Store version of your app the customer installed |
  | ↳ `original_purchase_date` | string | iOS only. Date the app was first purchased/downloaded |
  | ↳ `management_url` | string | URL for managing the subscriber subscriptions |
  | ↳ `subscriptions` | object | Map of product identifiers to subscription objects |
  | ↳ `store_transaction_id` | string | Store transaction identifier |
  | ↳ `original_transaction_id` | string | Original transaction identifier |
  | ↳ `purchase_date` | string | ISO 8601 purchase date |
  | ↳ `original_purchase_date` | string | ISO 8601 date of the original purchase |
  | ↳ `expires_date` | string | ISO 8601 expiration date |
  | ↳ `is_sandbox` | boolean | Whether this is a sandbox purchase |
  | ↳ `unsubscribe_detected_at` | string | ISO 8601 date when unsubscribe was detected |
  | ↳ `billing_issues_detected_at` | string | ISO 8601 date when billing issues were detected |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `ownership_type` | string | Ownership type (purchased, family\_shared) |
  | ↳ `period_type` | string | Period type (normal, trial, intro, promotional, prepaid) |
  | ↳ `store` | string | Store the subscription was purchased from (app\_store, play\_store, stripe, etc.) |
  | ↳ `refunded_at` | string | ISO 8601 date when subscription was refunded |
  | ↳ `auto_resume_date` | string | ISO 8601 date when a paused subscription will auto-resume |
  | ↳ `product_plan_identifier` | string | Google Play base plan identifier (for products set up after Feb 2023) |
  | ↳ `entitlements` | object | Map of entitlement identifiers to entitlement objects |
  | ↳ `expires_date` | string | ISO 8601 expiration date (null for non-expiring entitlements) |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `product_identifier` | string | Product identifier |
  | ↳ `purchase_date` | string | ISO 8601 date of the latest purchase or renewal |
  | ↳ `non_subscriptions` | object | Map of non-subscription product identifiers to arrays of purchase objects |
  | ↳ `other_purchases` | object | Other purchases attached to the subscriber |
  | ↳ `subscriber_attributes` | object | Custom attributes set on the subscriber. Only returned when using a secret API key |
</ReferenceDetails>

### RevenueCat Revoke Google Subscription [#revenuecat-revoke-google-subscription]

Immediately revoke access to a Google Play subscription and issue a refund (Google Play only)

<ReferenceDetails>
  #### Input [#input-9]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | RevenueCat secret API key (sk\_...) |
  | `appUserId` | string | Yes | The app user ID of the subscriber |
  | `productId` | string | Yes | The Google Play product identifier of the subscription to revoke |

  #### Output [#output-9]

  | Parameter | Type | Description |
  | - | - | - |
  | `subscriber` | object | RevenueCat subscriber object |
  | ↳ `first_seen` | string | ISO 8601 date when subscriber was first seen |
  | ↳ `last_seen` | string | ISO 8601 date when subscriber was last seen |
  | ↳ `original_app_user_id` | string | Original app user ID |
  | ↳ `original_application_version` | string | iOS only. First App Store version of your app the customer installed |
  | ↳ `original_purchase_date` | string | iOS only. Date the app was first purchased/downloaded |
  | ↳ `management_url` | string | URL for managing the subscriber subscriptions |
  | ↳ `subscriptions` | object | Map of product identifiers to subscription objects |
  | ↳ `store_transaction_id` | string | Store transaction identifier |
  | ↳ `original_transaction_id` | string | Original transaction identifier |
  | ↳ `purchase_date` | string | ISO 8601 purchase date |
  | ↳ `original_purchase_date` | string | ISO 8601 date of the original purchase |
  | ↳ `expires_date` | string | ISO 8601 expiration date |
  | ↳ `is_sandbox` | boolean | Whether this is a sandbox purchase |
  | ↳ `unsubscribe_detected_at` | string | ISO 8601 date when unsubscribe was detected |
  | ↳ `billing_issues_detected_at` | string | ISO 8601 date when billing issues were detected |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `ownership_type` | string | Ownership type (purchased, family\_shared) |
  | ↳ `period_type` | string | Period type (normal, trial, intro, promotional, prepaid) |
  | ↳ `store` | string | Store the subscription was purchased from (app\_store, play\_store, stripe, etc.) |
  | ↳ `refunded_at` | string | ISO 8601 date when subscription was refunded |
  | ↳ `auto_resume_date` | string | ISO 8601 date when a paused subscription will auto-resume |
  | ↳ `product_plan_identifier` | string | Google Play base plan identifier (for products set up after Feb 2023) |
  | ↳ `entitlements` | object | Map of entitlement identifiers to entitlement objects |
  | ↳ `expires_date` | string | ISO 8601 expiration date (null for non-expiring entitlements) |
  | ↳ `grace_period_expires_date` | string | ISO 8601 grace period expiration date |
  | ↳ `product_identifier` | string | Product identifier |
  | ↳ `purchase_date` | string | ISO 8601 date of the latest purchase or renewal |
  | ↳ `non_subscriptions` | object | Map of non-subscription product identifiers to arrays of purchase objects |
  | ↳ `other_purchases` | object | Other purchases attached to the subscriber |
  | ↳ `subscriber_attributes` | object | Custom attributes set on the subscriber. Only returned when using a secret API key |
</ReferenceDetails>

## Triggers [#triggers]

A trigger starts a workflow when a supported event occurs in this service.

### RevenueCat Cancellation [#revenuecat-cancellation]

Trigger workflow when a subscriber cancels a RevenueCat subscription

<ReferenceDetails label="Configuration and outputs">
  #### Configuration [#configuration]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Secret API key with the project\_configuration:integrations:read\_write permission. Sim uses it to create and remove the webhook in RevenueCat. |
  | `projectId` | string | Yes | RevenueCat project identifier the webhook integration is created in. |
  | `environment` | string | No | Restrict events to a single environment, or receive all of them. |

  #### Output [#output-10]

  | Parameter | Type | Description |
  | - | - | - |
  | `type` | string | Event type (e.g., INITIAL\_PURCHASE, RENEWAL) |
  | `id` | string | Unique event identifier |
  | `app_id` | string | RevenueCat app public identifier |
  | `event_timestamp_ms` | number | Timestamp (ms since epoch) when the event was generated |
  | `app_user_id` | string | Current App User ID |
  | `original_app_user_id` | string | First App User ID ever used |
  | `aliases` | json | All App User IDs ever used by the subscriber |
  | `product_id` | string | Product identifier |
  | `new_product_id` | string | Product identifier changed to (PRODUCT\_CHANGE events only) |
  | `period_type` | string | Period type (TRIAL, INTRO, NORMAL, PROMOTIONAL, or PREPAID) |
  | `purchased_at_ms` | number | Purchase timestamp (ms since epoch) |
  | `expiration_at_ms` | number | Expiration timestamp (ms since epoch), nullable |
  | `environment` | string | Environment (SANDBOX or PRODUCTION) |
  | `entitlement_id` | string | Deprecated single entitlement identifier |
  | `entitlement_ids` | json | Associated entitlement identifiers |
  | `presented_offering_id` | string | Identifier of the offering presented to the user |
  | `transaction_id` | string | Store transaction ID |
  | `original_transaction_id` | string | Original subscription transaction ID |
  | `is_family_share` | boolean | Whether the purchase was family shared |
  | `country_code` | string | ISO country code of the subscriber |
  | `currency` | string | ISO 4217 currency code |
  | `price` | number | Price in USD |
  | `price_in_purchased_currency` | number | Price in the currency the purchase was made in |
  | `store` | string | Store the purchase was made on (e.g., APP\_STORE) |
  | `takehome_percentage` | number | Estimated percentage of the price taken home after store commission |
  | `tax_percentage` | number | Estimated percentage taken as tax |
  | `commission_percentage` | number | Estimated percentage taken by the store as commission |
  | `offer_code` | string | Offer code applied to the purchase, if any |
  | `subscriber_attributes` | json | Subscriber attributes at the time of the event |
  | `experiments` | json | Experiments the subscriber was enrolled in |
  | `cancel_reason` | string | Reason for cancellation (CANCELLATION events only) |
  | `expiration_reason` | string | Reason for expiration (EXPIRATION events only) |
  | `api_version` | string | RevenueCat webhook API version |
  | `event` | json | Full RevenueCat event object |
</ReferenceDetails>

### RevenueCat Expiration [#revenuecat-expiration]

Trigger workflow when a RevenueCat subscription expires

<ReferenceDetails label="Configuration and outputs">
  #### Configuration [#configuration-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Secret API key with the project\_configuration:integrations:read\_write permission. Sim uses it to create and remove the webhook in RevenueCat. |
  | `projectId` | string | Yes | RevenueCat project identifier the webhook integration is created in. |
  | `environment` | string | No | Restrict events to a single environment, or receive all of them. |

  #### Output [#output-11]

  | Parameter | Type | Description |
  | - | - | - |
  | `type` | string | Event type (e.g., INITIAL\_PURCHASE, RENEWAL) |
  | `id` | string | Unique event identifier |
  | `app_id` | string | RevenueCat app public identifier |
  | `event_timestamp_ms` | number | Timestamp (ms since epoch) when the event was generated |
  | `app_user_id` | string | Current App User ID |
  | `original_app_user_id` | string | First App User ID ever used |
  | `aliases` | json | All App User IDs ever used by the subscriber |
  | `product_id` | string | Product identifier |
  | `new_product_id` | string | Product identifier changed to (PRODUCT\_CHANGE events only) |
  | `period_type` | string | Period type (TRIAL, INTRO, NORMAL, PROMOTIONAL, or PREPAID) |
  | `purchased_at_ms` | number | Purchase timestamp (ms since epoch) |
  | `expiration_at_ms` | number | Expiration timestamp (ms since epoch), nullable |
  | `environment` | string | Environment (SANDBOX or PRODUCTION) |
  | `entitlement_id` | string | Deprecated single entitlement identifier |
  | `entitlement_ids` | json | Associated entitlement identifiers |
  | `presented_offering_id` | string | Identifier of the offering presented to the user |
  | `transaction_id` | string | Store transaction ID |
  | `original_transaction_id` | string | Original subscription transaction ID |
  | `is_family_share` | boolean | Whether the purchase was family shared |
  | `country_code` | string | ISO country code of the subscriber |
  | `currency` | string | ISO 4217 currency code |
  | `price` | number | Price in USD |
  | `price_in_purchased_currency` | number | Price in the currency the purchase was made in |
  | `store` | string | Store the purchase was made on (e.g., APP\_STORE) |
  | `takehome_percentage` | number | Estimated percentage of the price taken home after store commission |
  | `tax_percentage` | number | Estimated percentage taken as tax |
  | `commission_percentage` | number | Estimated percentage taken by the store as commission |
  | `offer_code` | string | Offer code applied to the purchase, if any |
  | `subscriber_attributes` | json | Subscriber attributes at the time of the event |
  | `experiments` | json | Experiments the subscriber was enrolled in |
  | `cancel_reason` | string | Reason for cancellation (CANCELLATION events only) |
  | `expiration_reason` | string | Reason for expiration (EXPIRATION events only) |
  | `api_version` | string | RevenueCat webhook API version |
  | `event` | json | Full RevenueCat event object |
</ReferenceDetails>

### RevenueCat Initial Purchase [#revenuecat-initial-purchase]

Trigger workflow when a subscriber makes their first purchase in RevenueCat

<ReferenceDetails label="Configuration and outputs">
  #### Configuration [#configuration-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Secret API key with the project\_configuration:integrations:read\_write permission. Sim uses it to create and remove the webhook in RevenueCat. |
  | `projectId` | string | Yes | RevenueCat project identifier the webhook integration is created in. |
  | `environment` | string | No | Restrict events to a single environment, or receive all of them. |

  #### Output [#output-12]

  | Parameter | Type | Description |
  | - | - | - |
  | `type` | string | Event type (e.g., INITIAL\_PURCHASE, RENEWAL) |
  | `id` | string | Unique event identifier |
  | `app_id` | string | RevenueCat app public identifier |
  | `event_timestamp_ms` | number | Timestamp (ms since epoch) when the event was generated |
  | `app_user_id` | string | Current App User ID |
  | `original_app_user_id` | string | First App User ID ever used |
  | `aliases` | json | All App User IDs ever used by the subscriber |
  | `product_id` | string | Product identifier |
  | `new_product_id` | string | Product identifier changed to (PRODUCT\_CHANGE events only) |
  | `period_type` | string | Period type (TRIAL, INTRO, NORMAL, PROMOTIONAL, or PREPAID) |
  | `purchased_at_ms` | number | Purchase timestamp (ms since epoch) |
  | `expiration_at_ms` | number | Expiration timestamp (ms since epoch), nullable |
  | `environment` | string | Environment (SANDBOX or PRODUCTION) |
  | `entitlement_id` | string | Deprecated single entitlement identifier |
  | `entitlement_ids` | json | Associated entitlement identifiers |
  | `presented_offering_id` | string | Identifier of the offering presented to the user |
  | `transaction_id` | string | Store transaction ID |
  | `original_transaction_id` | string | Original subscription transaction ID |
  | `is_family_share` | boolean | Whether the purchase was family shared |
  | `country_code` | string | ISO country code of the subscriber |
  | `currency` | string | ISO 4217 currency code |
  | `price` | number | Price in USD |
  | `price_in_purchased_currency` | number | Price in the currency the purchase was made in |
  | `store` | string | Store the purchase was made on (e.g., APP\_STORE) |
  | `takehome_percentage` | number | Estimated percentage of the price taken home after store commission |
  | `tax_percentage` | number | Estimated percentage taken as tax |
  | `commission_percentage` | number | Estimated percentage taken by the store as commission |
  | `offer_code` | string | Offer code applied to the purchase, if any |
  | `subscriber_attributes` | json | Subscriber attributes at the time of the event |
  | `experiments` | json | Experiments the subscriber was enrolled in |
  | `cancel_reason` | string | Reason for cancellation (CANCELLATION events only) |
  | `expiration_reason` | string | Reason for expiration (EXPIRATION events only) |
  | `api_version` | string | RevenueCat webhook API version |
  | `event` | json | Full RevenueCat event object |
</ReferenceDetails>

### RevenueCat Non-Renewing Purchase [#revenuecat-non-renewing-purchase]

Trigger workflow when a subscriber makes a non-renewing purchase in RevenueCat

<ReferenceDetails label="Configuration and outputs">
  #### Configuration [#configuration-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Secret API key with the project\_configuration:integrations:read\_write permission. Sim uses it to create and remove the webhook in RevenueCat. |
  | `projectId` | string | Yes | RevenueCat project identifier the webhook integration is created in. |
  | `environment` | string | No | Restrict events to a single environment, or receive all of them. |

  #### Output [#output-13]

  | Parameter | Type | Description |
  | - | - | - |
  | `type` | string | Event type (e.g., INITIAL\_PURCHASE, RENEWAL) |
  | `id` | string | Unique event identifier |
  | `app_id` | string | RevenueCat app public identifier |
  | `event_timestamp_ms` | number | Timestamp (ms since epoch) when the event was generated |
  | `app_user_id` | string | Current App User ID |
  | `original_app_user_id` | string | First App User ID ever used |
  | `aliases` | json | All App User IDs ever used by the subscriber |
  | `product_id` | string | Product identifier |
  | `new_product_id` | string | Product identifier changed to (PRODUCT\_CHANGE events only) |
  | `period_type` | string | Period type (TRIAL, INTRO, NORMAL, PROMOTIONAL, or PREPAID) |
  | `purchased_at_ms` | number | Purchase timestamp (ms since epoch) |
  | `expiration_at_ms` | number | Expiration timestamp (ms since epoch), nullable |
  | `environment` | string | Environment (SANDBOX or PRODUCTION) |
  | `entitlement_id` | string | Deprecated single entitlement identifier |
  | `entitlement_ids` | json | Associated entitlement identifiers |
  | `presented_offering_id` | string | Identifier of the offering presented to the user |
  | `transaction_id` | string | Store transaction ID |
  | `original_transaction_id` | string | Original subscription transaction ID |
  | `is_family_share` | boolean | Whether the purchase was family shared |
  | `country_code` | string | ISO country code of the subscriber |
  | `currency` | string | ISO 4217 currency code |
  | `price` | number | Price in USD |
  | `price_in_purchased_currency` | number | Price in the currency the purchase was made in |
  | `store` | string | Store the purchase was made on (e.g., APP\_STORE) |
  | `takehome_percentage` | number | Estimated percentage of the price taken home after store commission |
  | `tax_percentage` | number | Estimated percentage taken as tax |
  | `commission_percentage` | number | Estimated percentage taken by the store as commission |
  | `offer_code` | string | Offer code applied to the purchase, if any |
  | `subscriber_attributes` | json | Subscriber attributes at the time of the event |
  | `experiments` | json | Experiments the subscriber was enrolled in |
  | `cancel_reason` | string | Reason for cancellation (CANCELLATION events only) |
  | `expiration_reason` | string | Reason for expiration (EXPIRATION events only) |
  | `api_version` | string | RevenueCat webhook API version |
  | `event` | json | Full RevenueCat event object |
</ReferenceDetails>

### RevenueCat Product Change [#revenuecat-product-change]

Trigger workflow when a subscriber changes their RevenueCat subscription product

<ReferenceDetails label="Configuration and outputs">
  #### Configuration [#configuration-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Secret API key with the project\_configuration:integrations:read\_write permission. Sim uses it to create and remove the webhook in RevenueCat. |
  | `projectId` | string | Yes | RevenueCat project identifier the webhook integration is created in. |
  | `environment` | string | No | Restrict events to a single environment, or receive all of them. |

  #### Output [#output-14]

  | Parameter | Type | Description |
  | - | - | - |
  | `type` | string | Event type (e.g., INITIAL\_PURCHASE, RENEWAL) |
  | `id` | string | Unique event identifier |
  | `app_id` | string | RevenueCat app public identifier |
  | `event_timestamp_ms` | number | Timestamp (ms since epoch) when the event was generated |
  | `app_user_id` | string | Current App User ID |
  | `original_app_user_id` | string | First App User ID ever used |
  | `aliases` | json | All App User IDs ever used by the subscriber |
  | `product_id` | string | Product identifier |
  | `new_product_id` | string | Product identifier changed to (PRODUCT\_CHANGE events only) |
  | `period_type` | string | Period type (TRIAL, INTRO, NORMAL, PROMOTIONAL, or PREPAID) |
  | `purchased_at_ms` | number | Purchase timestamp (ms since epoch) |
  | `expiration_at_ms` | number | Expiration timestamp (ms since epoch), nullable |
  | `environment` | string | Environment (SANDBOX or PRODUCTION) |
  | `entitlement_id` | string | Deprecated single entitlement identifier |
  | `entitlement_ids` | json | Associated entitlement identifiers |
  | `presented_offering_id` | string | Identifier of the offering presented to the user |
  | `transaction_id` | string | Store transaction ID |
  | `original_transaction_id` | string | Original subscription transaction ID |
  | `is_family_share` | boolean | Whether the purchase was family shared |
  | `country_code` | string | ISO country code of the subscriber |
  | `currency` | string | ISO 4217 currency code |
  | `price` | number | Price in USD |
  | `price_in_purchased_currency` | number | Price in the currency the purchase was made in |
  | `store` | string | Store the purchase was made on (e.g., APP\_STORE) |
  | `takehome_percentage` | number | Estimated percentage of the price taken home after store commission |
  | `tax_percentage` | number | Estimated percentage taken as tax |
  | `commission_percentage` | number | Estimated percentage taken by the store as commission |
  | `offer_code` | string | Offer code applied to the purchase, if any |
  | `subscriber_attributes` | json | Subscriber attributes at the time of the event |
  | `experiments` | json | Experiments the subscriber was enrolled in |
  | `cancel_reason` | string | Reason for cancellation (CANCELLATION events only) |
  | `expiration_reason` | string | Reason for expiration (EXPIRATION events only) |
  | `api_version` | string | RevenueCat webhook API version |
  | `event` | json | Full RevenueCat event object |
</ReferenceDetails>

### RevenueCat Renewal [#revenuecat-renewal]

Trigger workflow when a RevenueCat subscription renews

<ReferenceDetails label="Configuration and outputs">
  #### Configuration [#configuration-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Secret API key with the project\_configuration:integrations:read\_write permission. Sim uses it to create and remove the webhook in RevenueCat. |
  | `projectId` | string | Yes | RevenueCat project identifier the webhook integration is created in. |
  | `environment` | string | No | Restrict events to a single environment, or receive all of them. |

  #### Output [#output-15]

  | Parameter | Type | Description |
  | - | - | - |
  | `type` | string | Event type (e.g., INITIAL\_PURCHASE, RENEWAL) |
  | `id` | string | Unique event identifier |
  | `app_id` | string | RevenueCat app public identifier |
  | `event_timestamp_ms` | number | Timestamp (ms since epoch) when the event was generated |
  | `app_user_id` | string | Current App User ID |
  | `original_app_user_id` | string | First App User ID ever used |
  | `aliases` | json | All App User IDs ever used by the subscriber |
  | `product_id` | string | Product identifier |
  | `new_product_id` | string | Product identifier changed to (PRODUCT\_CHANGE events only) |
  | `period_type` | string | Period type (TRIAL, INTRO, NORMAL, PROMOTIONAL, or PREPAID) |
  | `purchased_at_ms` | number | Purchase timestamp (ms since epoch) |
  | `expiration_at_ms` | number | Expiration timestamp (ms since epoch), nullable |
  | `environment` | string | Environment (SANDBOX or PRODUCTION) |
  | `entitlement_id` | string | Deprecated single entitlement identifier |
  | `entitlement_ids` | json | Associated entitlement identifiers |
  | `presented_offering_id` | string | Identifier of the offering presented to the user |
  | `transaction_id` | string | Store transaction ID |
  | `original_transaction_id` | string | Original subscription transaction ID |
  | `is_family_share` | boolean | Whether the purchase was family shared |
  | `country_code` | string | ISO country code of the subscriber |
  | `currency` | string | ISO 4217 currency code |
  | `price` | number | Price in USD |
  | `price_in_purchased_currency` | number | Price in the currency the purchase was made in |
  | `store` | string | Store the purchase was made on (e.g., APP\_STORE) |
  | `takehome_percentage` | number | Estimated percentage of the price taken home after store commission |
  | `tax_percentage` | number | Estimated percentage taken as tax |
  | `commission_percentage` | number | Estimated percentage taken by the store as commission |
  | `offer_code` | string | Offer code applied to the purchase, if any |
  | `subscriber_attributes` | json | Subscriber attributes at the time of the event |
  | `experiments` | json | Experiments the subscriber was enrolled in |
  | `cancel_reason` | string | Reason for cancellation (CANCELLATION events only) |
  | `expiration_reason` | string | Reason for expiration (EXPIRATION events only) |
  | `api_version` | string | RevenueCat webhook API version |
  | `event` | json | Full RevenueCat event object |
</ReferenceDetails>
