> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# RevenueCat Integration for AI Agents & Workflows

> Manage in-app subscriptions and entitlements. Retrieve customer subscription status, grant or revoke promotional entitlements, record purchases, update subscriber attributes, and manage Google Play subscription billing.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/placeholder.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=a4046f9cd6d738c81259050e9833913c" alt="RevenueCat logo" width="72" height="72" data-path="logos/placeholder.svg" />

## Overview

Add **RevenueCat** to any ModuleX agent or workflow. Manage in-app subscriptions and entitlements against the RevenueCat REST API v1 (`api.revenuecat.com/v1`). Look up subscribers, grant or revoke promotional entitlements, record purchases, update subscriber attributes, and manage Google Play subscription billing.

<Info>
  **Categories**: Finance & Payments · Payments · Subscriptions · **Auth**: API Key · **Actions**: 10
</Info>

## Authentication

### API Key Authentication

Authenticate using your RevenueCat REST API v1 key

<Steps>
  <Step title="Step 1">
    Go to [https://app.revenuecat.com](https://app.revenuecat.com) and log in
  </Step>

  <Step title="Step 2">
    Open Project Settings → API Keys
  </Step>

  <Step title="Step 3">
    Create or copy a secret API key (sk\_...) for write operations
  </Step>

  <Step title="Step 4">
    Paste the API key below
  </Step>
</Steps>

#### Required Credentials

| Field              | Description                                              | Required | Format                              |
| ------------------ | -------------------------------------------------------- | -------- | ----------------------------------- |
| RevenueCat API Key | Your RevenueCat REST API v1 key (secret key recommended) | Yes      | `sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |

## Available Actions

<AccordionGroup>
  <Accordion title="get_customer — Retrieve subscriber information by app user ID.">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "Subscriber": {
          "additionalProperties": false,
          "description": "A RevenueCat subscriber object.\n\n``subscriptions`` and ``entitlements`` are maps keyed by product /\nentitlement identifier; their values are left as opaque dicts so the\nupstream shape is preserved verbatim.",
          "properties": {
            "first_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "First Seen"
            },
            "last_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Last Seen"
            },
            "original_app_user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original App User Id"
            },
            "original_application_version": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Application Version"
            },
            "original_purchase_date": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Purchase Date"
            },
            "management_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Management Url"
            },
            "subscriptions": {
              "additionalProperties": true,
              "title": "Subscriptions",
              "type": "object"
            },
            "entitlements": {
              "additionalProperties": true,
              "title": "Entitlements",
              "type": "object"
            },
            "non_subscriptions": {
              "additionalProperties": true,
              "title": "Non Subscriptions",
              "type": "object"
            },
            "other_purchases": {
              "additionalProperties": true,
              "title": "Other Purchases",
              "type": "object"
            },
            "subscriber_attributes": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Subscriber Attributes"
            }
          },
          "title": "Subscriber",
          "type": "object"
        },
        "SubscriberMetadata": {
          "additionalProperties": false,
          "description": "Summary metadata derived from a subscriber payload.",
          "properties": {
            "app_user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "App User Id"
            },
            "first_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "First Seen"
            },
            "active_entitlements": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Active Entitlements"
            },
            "active_subscriptions": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Active Subscriptions"
            }
          },
          "title": "SubscriberMetadata",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "subscriber": {
          "anyOf": [
            {
              "$ref": "#/$defs/Subscriber"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "metadata": {
          "anyOf": [
            {
              "$ref": "#/$defs/SubscriberMetadata"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "GetCustomerOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_customer — Permanently delete a subscriber and all associated data.">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber to delete
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "deleted": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Deleted"
        },
        "app_user_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "App User Id"
        }
      },
      "required": [
        "success"
      ],
      "title": "DeleteCustomerOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_purchase — Record a purchase (receipt) for a subscriber via the REST API.">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber
    </ResponseField>

    <ResponseField name="fetch_token" type="string" required>
      Store receipt or purchase token: iOS base64 receipt / JWSTransaction, Android purchase token, Amazon receipt, Stripe subscription or Checkout Session ID, Roku transaction ID, or Paddle subscription/transaction ID
    </ResponseField>

    <ResponseField name="platform" type="string" required>
      Platform of the purchase, sent as the X-Platform header. One of: ios, android, amazon, macos, uikitformac, stripe, roku, paddle
    </ResponseField>

    <ResponseField name="product_id" type="string">
      Product identifier or SKU. Required for Google.
    </ResponseField>

    <ResponseField name="price" type="number">
      Price of the product. Required if you provide a currency.
    </ResponseField>

    <ResponseField name="currency" type="string">
      ISO 4217 currency code. Required if you provide a price.
    </ResponseField>

    <ResponseField name="is_restore" type="boolean">
      Deprecated. Triggers configured restore behavior for shared fetch tokens.
    </ResponseField>

    <ResponseField name="presented_offering_identifier" type="string">
      Identifier of the offering presented to the customer at purchase time.
    </ResponseField>

    <ResponseField name="payment_mode" type="string">
      Payment mode for the introductory period: pay\_as\_you\_go, pay\_up\_front, or free\_trial.
    </ResponseField>

    <ResponseField name="introductory_price" type="number">
      Introductory price paid (if any).
    </ResponseField>

    <ResponseField name="attributes" type="string">
      JSON object of subscriber attributes to set alongside the purchase. Each key maps to \{"value": string, "updated\_at\_ms": number}.
    </ResponseField>

    <ResponseField name="updated_at_ms" type="integer">
      UNIX epoch ms used to resolve attribute conflicts at the request level.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "Subscriber": {
          "additionalProperties": false,
          "description": "A RevenueCat subscriber object.\n\n``subscriptions`` and ``entitlements`` are maps keyed by product /\nentitlement identifier; their values are left as opaque dicts so the\nupstream shape is preserved verbatim.",
          "properties": {
            "first_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "First Seen"
            },
            "last_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Last Seen"
            },
            "original_app_user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original App User Id"
            },
            "original_application_version": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Application Version"
            },
            "original_purchase_date": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Purchase Date"
            },
            "management_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Management Url"
            },
            "subscriptions": {
              "additionalProperties": true,
              "title": "Subscriptions",
              "type": "object"
            },
            "entitlements": {
              "additionalProperties": true,
              "title": "Entitlements",
              "type": "object"
            },
            "non_subscriptions": {
              "additionalProperties": true,
              "title": "Non Subscriptions",
              "type": "object"
            },
            "other_purchases": {
              "additionalProperties": true,
              "title": "Other Purchases",
              "type": "object"
            },
            "subscriber_attributes": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Subscriber Attributes"
            }
          },
          "title": "Subscriber",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "customer": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Customer"
        },
        "subscriber": {
          "anyOf": [
            {
              "$ref": "#/$defs/Subscriber"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "CreatePurchaseOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="grant_entitlement — Grant a promotional entitlement to a subscriber.">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber
    </ResponseField>

    <ResponseField name="entitlement_identifier" type="string" required>
      The entitlement identifier to grant
    </ResponseField>

    <ResponseField name="duration" type="string">
      Deprecated. Provide either duration or end\_time\_ms (end\_time\_ms preferred). One of: daily, three\_day, weekly, two\_week, monthly, two\_month, three\_month, six\_month, yearly, lifetime.
    </ResponseField>

    <ResponseField name="end_time_ms" type="integer">
      Absolute end time in ms since Unix epoch. Use instead of duration.
    </ResponseField>

    <ResponseField name="start_time_ms" type="integer">
      Deprecated. Optional start time in ms since Unix epoch, used with duration.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "Subscriber": {
          "additionalProperties": false,
          "description": "A RevenueCat subscriber object.\n\n``subscriptions`` and ``entitlements`` are maps keyed by product /\nentitlement identifier; their values are left as opaque dicts so the\nupstream shape is preserved verbatim.",
          "properties": {
            "first_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "First Seen"
            },
            "last_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Last Seen"
            },
            "original_app_user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original App User Id"
            },
            "original_application_version": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Application Version"
            },
            "original_purchase_date": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Purchase Date"
            },
            "management_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Management Url"
            },
            "subscriptions": {
              "additionalProperties": true,
              "title": "Subscriptions",
              "type": "object"
            },
            "entitlements": {
              "additionalProperties": true,
              "title": "Entitlements",
              "type": "object"
            },
            "non_subscriptions": {
              "additionalProperties": true,
              "title": "Non Subscriptions",
              "type": "object"
            },
            "other_purchases": {
              "additionalProperties": true,
              "title": "Other Purchases",
              "type": "object"
            },
            "subscriber_attributes": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Subscriber Attributes"
            }
          },
          "title": "Subscriber",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "subscriber": {
          "anyOf": [
            {
              "$ref": "#/$defs/Subscriber"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "GrantEntitlementOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="revoke_entitlement — Revoke all promotional entitlements for a specific entitlement identifier.">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber
    </ResponseField>

    <ResponseField name="entitlement_identifier" type="string" required>
      The entitlement identifier to revoke
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "Subscriber": {
          "additionalProperties": false,
          "description": "A RevenueCat subscriber object.\n\n``subscriptions`` and ``entitlements`` are maps keyed by product /\nentitlement identifier; their values are left as opaque dicts so the\nupstream shape is preserved verbatim.",
          "properties": {
            "first_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "First Seen"
            },
            "last_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Last Seen"
            },
            "original_app_user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original App User Id"
            },
            "original_application_version": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Application Version"
            },
            "original_purchase_date": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Purchase Date"
            },
            "management_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Management Url"
            },
            "subscriptions": {
              "additionalProperties": true,
              "title": "Subscriptions",
              "type": "object"
            },
            "entitlements": {
              "additionalProperties": true,
              "title": "Entitlements",
              "type": "object"
            },
            "non_subscriptions": {
              "additionalProperties": true,
              "title": "Non Subscriptions",
              "type": "object"
            },
            "other_purchases": {
              "additionalProperties": true,
              "title": "Other Purchases",
              "type": "object"
            },
            "subscriber_attributes": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Subscriber Attributes"
            }
          },
          "title": "Subscriber",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "subscriber": {
          "anyOf": [
            {
              "$ref": "#/$defs/Subscriber"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "RevokeEntitlementOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_offerings — List all offerings configured for the project.">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      An app user ID to retrieve offerings for
    </ResponseField>

    <ResponseField name="platform" type="string">
      X-Platform header value. One of: ios, android, amazon, stripe, roku, paddle. Required for legacy public API keys; ignored with app-specific keys.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "Offering": {
          "additionalProperties": false,
          "description": "A single offering configured for the project.",
          "properties": {
            "identifier": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Identifier"
            },
            "description": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Description"
            },
            "packages": {
              "items": {
                "$ref": "#/$defs/OfferingPackage"
              },
              "title": "Packages",
              "type": "array"
            }
          },
          "title": "Offering",
          "type": "object"
        },
        "OfferingPackage": {
          "additionalProperties": false,
          "description": "A single package inside an offering.",
          "properties": {
            "identifier": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Identifier"
            },
            "platform_product_identifier": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Platform Product Identifier"
            }
          },
          "title": "OfferingPackage",
          "type": "object"
        },
        "OfferingsMetadata": {
          "additionalProperties": false,
          "description": "Summary metadata for a list-offerings response.",
          "properties": {
            "count": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Count"
            },
            "current_offering_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Current Offering Id"
            }
          },
          "title": "OfferingsMetadata",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "current_offering_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Current Offering Id"
        },
        "offerings": {
          "items": {
            "$ref": "#/$defs/Offering"
          },
          "title": "Offerings",
          "type": "array"
        },
        "metadata": {
          "anyOf": [
            {
              "$ref": "#/$defs/OfferingsMetadata"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "ListOfferingsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_subscriber_attributes — Update custom subscriber attributes (e.g., $email, $displayName, or custom key-value pairs).">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber
    </ResponseField>

    <ResponseField name="attributes" type="string" required>
      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).
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "updated": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Updated"
        },
        "app_user_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "App User Id"
        }
      },
      "required": [
        "success"
      ],
      "title": "UpdateSubscriberAttributesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="defer_google_subscription — Defer a Google Play subscription by extending its billing date (Google Play only).">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber
    </ResponseField>

    <ResponseField name="product_id" type="string" required>
      The Google Play product identifier of the subscription to defer
    </ResponseField>

    <ResponseField name="extend_by_days" type="integer">
      Number of days to extend by (1-365). Provide extend\_by\_days or expiry\_time\_ms.
    </ResponseField>

    <ResponseField name="expiry_time_ms" type="integer">
      Absolute new expiry time in ms since Unix epoch. Use instead of extend\_by\_days.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "Subscriber": {
          "additionalProperties": false,
          "description": "A RevenueCat subscriber object.\n\n``subscriptions`` and ``entitlements`` are maps keyed by product /\nentitlement identifier; their values are left as opaque dicts so the\nupstream shape is preserved verbatim.",
          "properties": {
            "first_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "First Seen"
            },
            "last_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Last Seen"
            },
            "original_app_user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original App User Id"
            },
            "original_application_version": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Application Version"
            },
            "original_purchase_date": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Purchase Date"
            },
            "management_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Management Url"
            },
            "subscriptions": {
              "additionalProperties": true,
              "title": "Subscriptions",
              "type": "object"
            },
            "entitlements": {
              "additionalProperties": true,
              "title": "Entitlements",
              "type": "object"
            },
            "non_subscriptions": {
              "additionalProperties": true,
              "title": "Non Subscriptions",
              "type": "object"
            },
            "other_purchases": {
              "additionalProperties": true,
              "title": "Other Purchases",
              "type": "object"
            },
            "subscriber_attributes": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Subscriber Attributes"
            }
          },
          "title": "Subscriber",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "subscriber": {
          "anyOf": [
            {
              "$ref": "#/$defs/Subscriber"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "DeferGoogleSubscriptionOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="refund_google_subscription — Refund a specific store transaction by its store transaction identifier and revoke access (subscription or non-subscription, last 365 days).">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber
    </ResponseField>

    <ResponseField name="store_transaction_id" type="string" required>
      The store transaction identifier of the purchase to refund (e.g., GPA.3309-9122-6177-45730 for Google Play)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "Subscriber": {
          "additionalProperties": false,
          "description": "A RevenueCat subscriber object.\n\n``subscriptions`` and ``entitlements`` are maps keyed by product /\nentitlement identifier; their values are left as opaque dicts so the\nupstream shape is preserved verbatim.",
          "properties": {
            "first_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "First Seen"
            },
            "last_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Last Seen"
            },
            "original_app_user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original App User Id"
            },
            "original_application_version": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Application Version"
            },
            "original_purchase_date": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Purchase Date"
            },
            "management_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Management Url"
            },
            "subscriptions": {
              "additionalProperties": true,
              "title": "Subscriptions",
              "type": "object"
            },
            "entitlements": {
              "additionalProperties": true,
              "title": "Entitlements",
              "type": "object"
            },
            "non_subscriptions": {
              "additionalProperties": true,
              "title": "Non Subscriptions",
              "type": "object"
            },
            "other_purchases": {
              "additionalProperties": true,
              "title": "Other Purchases",
              "type": "object"
            },
            "subscriber_attributes": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Subscriber Attributes"
            }
          },
          "title": "Subscriber",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "subscriber": {
          "anyOf": [
            {
              "$ref": "#/$defs/Subscriber"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "RefundGoogleSubscriptionOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="revoke_google_subscription — Immediately revoke access to a Google Play subscription and issue a refund (Google Play only).">
    ### Parameters

    <ResponseField name="app_user_id" type="string" required>
      The app user ID of the subscriber
    </ResponseField>

    <ResponseField name="product_id" type="string" required>
      The Google Play product identifier of the subscription to revoke
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "Subscriber": {
          "additionalProperties": false,
          "description": "A RevenueCat subscriber object.\n\n``subscriptions`` and ``entitlements`` are maps keyed by product /\nentitlement identifier; their values are left as opaque dicts so the\nupstream shape is preserved verbatim.",
          "properties": {
            "first_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "First Seen"
            },
            "last_seen": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Last Seen"
            },
            "original_app_user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original App User Id"
            },
            "original_application_version": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Application Version"
            },
            "original_purchase_date": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Original Purchase Date"
            },
            "management_url": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Management Url"
            },
            "subscriptions": {
              "additionalProperties": true,
              "title": "Subscriptions",
              "type": "object"
            },
            "entitlements": {
              "additionalProperties": true,
              "title": "Entitlements",
              "type": "object"
            },
            "non_subscriptions": {
              "additionalProperties": true,
              "title": "Non Subscriptions",
              "type": "object"
            },
            "other_purchases": {
              "additionalProperties": true,
              "title": "Other Purchases",
              "type": "object"
            },
            "subscriber_attributes": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Subscriber Attributes"
            }
          },
          "title": "Subscriber",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "subscriber": {
          "anyOf": [
            {
              "$ref": "#/$defs/Subscriber"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "RevokeGoogleSubscriptionOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* **Rate limits**: RevenueCat applies per-endpoint rate limits; the
  `429` responses include a `Retry-After` header. Plan retries on the
  agent side.
* **Grant / revoke entitlement** is for *promotional* entitlements
  only and requires a secret key.
* **Defer / refund / revoke Google subscription** apply to Google Play
  purchases only. `grant_entitlement` and `defer_google_subscription`
  require exactly one of their two mutually-exclusive time parameters.
* **Error model**: non-2xx responses and timeouts are caught and
  returned as `success=False` + `error` rather than raising. RevenueCat
  returns `{code, message}` on errors, which is surfaced in `error`.

## Related integrations

<CardGroup cols={3}>
  <Card title="Lemon Squeezy" href="/integrations/tools/lemon-squeezy" />

  <Card title="Stripe" href="/integrations/tools/stripe" />

  <Card title="Square" href="/integrations/tools/square" />
</CardGroup>

## Links

* [RevenueCat](https://www.revenuecat.com)
