### Get a Package Request Example Source: https://www.revenuecat.com/docs/api-v2 This example demonstrates how to construct a GET request to retrieve details for a specific package within a project. It includes path parameters for project and package IDs, and an optional query parameter to expand product details. ```http GET /v2/projects/proj1ab2c3d4/packages/pkge1a2b3c4d5?expand=product HTTP/1.1 Host: api.revenuecat.com Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Search Subscriptions by Store Identifier (Example) Source: https://www.revenuecat.com/docs/api-v2 This example demonstrates how to construct a request to search for subscriptions using a store's subscription identifier. Various store identifier formats are supported. ```http GET /v2/projects/proj1ab2c3d4/subscriptions?store_subscription_identifier=9aJscueFTxLPZXXo-AlBTkI0OnFXR2qiH14C1aqWnOT=:3:11..8 HTTP/1.1 Host: api.revenuecat.com Authorization: Bearer YOUR_API_KEY ``` ```http GET /v2/projects/proj1ab2c3d4/subscriptions?store_subscription_identifier=100001234567890 HTTP/1.1 Host: api.revenuecat.com Authorization: Bearer YOUR_API_KEY ``` ```http GET /v2/projects/proj1ab2c3d4/subscriptions?store_subscription_identifier=txn_01jss4bz50g1z5yw121npeb3ag HTTP/1.1 Host: api.revenuecat.com Authorization: Bearer YOUR_API_KEY ``` ```http GET /v2/projects/proj1ab2c3d4/subscriptions?store_subscription_identifier=GPA.1234-5678-9012-34567..0 HTTP/1.1 Host: api.revenuecat.com Authorization: Bearer YOUR_API_KEY ``` ```http GET /v2/projects/proj1ab2c3d4/subscriptions?store_subscription_identifier=txRcb553a54d4738816a63f1a05cfcb1723e3..1746748685 HTTP/1.1 Host: api.revenuecat.com Authorization: Bearer YOUR_API_KEY ``` ```http GET /v2/projects/proj1ab2c3d4/subscriptions?store_subscription_identifier=4ab8df12-3003-11f0-9646-8ac68bcdcaed HTTP/1.1 Host: api.revenuecat.com Authorization: Bearer YOUR_API_KEY ``` ```http GET /v2/projects/proj1ab2c3d4/subscriptions?store_subscription_identifier=si_Rww1psqupbKxmt HTTP/1.1 Host: api.revenuecat.com Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Example API Response (200 OK) Source: https://www.revenuecat.com/docs/api-v2 This is an example of a successful response when retrieving authenticated management URLs. It includes the object type and the management URL. ```json { "object": "authenticated_management_url", "management_url": "https://billing.revenuecat.com/app1a2b3c4/sub1ab2c3d4e5?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" } ``` -------------------------------- ### Get Paywalls Request Example Source: https://www.revenuecat.com/docs/api-v2 This endpoint retrieves a list of paywalls for a given project. It requires the 'project_configuration:offerings:read' permission and has a default rate limit. ```http GET https://api.revenuecat.com/v2/projects/{project_id}/paywalls # Query Parameters: # starting_after: string (optional) # limit: integer (optional, default: 20) # expand: Array of strings (optional, e.g., expand=items.offering) ``` -------------------------------- ### Get Project Overview Metrics Source: https://www.revenuecat.com/docs/api-v2 Retrieve a summary of key metrics for a specific project. Use this to get a high-level view of project performance. ```json { "object": "overview_metrics", "metrics": [ { "object": "overview_metric", "id": "active_trials", "name": "Active Trials", "description": "string", "unit": "$", "period": "P0D", "value": 34765, "last_updated_at": 1658399423658, "last_updated_at_iso8601": "2022-10-13 09:45:00.123000+00:00" } ], "currency": "EUR" } ``` -------------------------------- ### Create Virtual Currency Response Sample Source: https://www.revenuecat.com/docs/api-v2 Example of a successful response after creating a virtual currency. It returns the details of the newly created currency. ```json { "state": "active", "object": "virtual_currency", "project_id": "proj1ab2c3d4", "code": "GLD", "name": "Gold", "created_at": 1658399423658, "description": "Gold currency used in the game", "product_grants": [ { "object": "virtual_currency.product_grant", "product_ids": [ "prode1a2b3c4d5" ], "amount": 100, "trial_amount": 0, "expire_at_cycle_end": false } ] } ``` -------------------------------- ### Package Creation Response (201 Success) Source: https://www.revenuecat.com/docs/api-v2 Example of a successful response when a package is created. It includes details of the created package and its associated products. ```json { "object": "package", "id": "pkge1a2b3c4d5", "lookup_key": "monthly", "display_name": "Monthly discounted with 3-day trial", "position": 1, "created_at": 1658399423658, "products": { "object": "list", "items": [ { "product": { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" }, "eligibility_criteria": "all" } ], "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac", "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products" } } ``` -------------------------------- ### Get a product Source: https://www.revenuecat.com/docs/api-v2 Retrieves details for a specific product within a project. This operation requires read permissions for products. ```APIDOC ## GET /v2/projects/{project_id}/products/{product_id} ### Description Retrieves details for a specific product within a project. This operation requires read permissions for products. ### Method GET ### Endpoint https://api.revenuecat.com/v2/projects/{project_id}/products/{product_id} ### Parameters #### Path Parameters - **project_id** (string) - Required - ID of the project. Example: proj1ab2c3d4 - **product_id** (string) - Required - ID of the product. Example: prod1a2b3c4d5 #### Query Parameters - **expand** (Array of strings) - Optional - Specifies which fields in the response should be expanded. Accepted values are: `app` (requires `project_configuration:apps:read` permission). ### Responses #### Success Response (200) - **state** (string) - The current state of the product (e.g., "active"). - **object** (string) - The type of object, which is "product". - **id** (string) - The unique identifier for the product. - **store_identifier** (string) - The identifier for the product in the app store. - **type** (string) - The type of product (e.g., "subscription"). - **subscription** (object) - Details specific to subscription products. - **one_time** (object) - Details specific to one-time purchase products. - **created_at** (integer) - Timestamp of when the product was created. - **app_id** (string) - The ID of the associated app. - **app** (object) - Details about the associated app. - **indicative_price** (object) - Information about the product's indicative price. - **display_name** (string) - The display name of the product. #### Response Example (200) ```json { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" } ``` ``` -------------------------------- ### List Virtual Currencies Response Sample Source: https://www.revenuecat.com/docs/api-v2 Example of a successful response when listing virtual currencies. It includes currency details and pagination information. ```json { "object": "list", "items": [ { "state": "active", "object": "virtual_currency", "project_id": "proj1ab2c3d4", "code": "GLD", "name": "Gold", "created_at": 1658399423658, "description": "Gold currency used in the game", "product_grants": [ { "object": "virtual_currency.product_grant", "product_ids": [ "prode1a2b3c4d5" ], "amount": 100, "trial_amount": 0, "expire_at_cycle_end": false } ] } ], "next_page": "/v2/projects/proj1ab2c3d4/virtual_currencies?starting_after=GLD", "url": "/v2/projects/proj1ab2c3d4/virtual_currencies" } ``` -------------------------------- ### Create Product Request Body Source: https://www.revenuecat.com/docs/api-v2 Example of a JSON payload for creating a product. This includes essential fields like store_identifier, app_id, and type. ```json { "store_identifier": "com.revenuecat.magicweather.monthly9.99", "app_id": "app1a2b3c4", "type": "subscription", "display_name": "Premium Monthly 2023" } ``` -------------------------------- ### Get Projects Response Body Source: https://www.revenuecat.com/docs/api-v2 Example response body for the 'Get a list of projects' endpoint. It returns a list of project objects, including pagination information. ```json { "object": "list", "items": [ { "object": "project", "id": "proj1ab2c3d4", "name": "MagicWeather", "created_at": 1658399423658, "icon_url": "https://www.appatar.io/abc123/small", "icon_url_large": "https://www.appatar.io/abc123/large" } ], "next_page": "/v2/projects?starting_after=projab21dac", "url": "/v2/projects" } ``` -------------------------------- ### Get a list of virtual currencies Source: https://www.revenuecat.com/docs/api-v2 Retrieves a paginated list of virtual currencies associated with a specific project. Supports filtering by starting point and limit. ```APIDOC ## GET /projects/{project_id}/virtual_currencies ### Description Retrieves a paginated list of virtual currencies associated with a specific project. Supports filtering by starting point and limit. ### Method GET ### Endpoint /projects/{project_id}/virtual_currencies ### Parameters #### Path Parameters - **project_id** (string) - Required - <= 255 characters - The ID of the project. #### Query Parameters - **starting_after** (string) - Optional - Example: starting_after=ent12354 - Returns virtual currencies after the specified cursor. - **limit** (integer) - Optional - Default: 20 - The maximum number of virtual currencies to return. ### Responses #### Success Response (200) Success. #### Error Responses - **400**: Bad request - **401**: Unauthorized - **403**: Access denied - **404**: Not found - **423**: Locked - **429**: Rate limit exceeded - **500**: Internal server error - **503**: Internal server error ``` -------------------------------- ### Sample Response for Offerings Source: https://www.revenuecat.com/docs/api-v2 This is a sample JSON response when retrieving a list of offerings. It includes details about each offering, its packages, and associated products. ```json { "object": "list", "items": [ { "state": "active", "object": "offering", "id": "ofrnge1a2b3c4d5", "lookup_key": "default", "display_name": "The standard set of packages", "is_current": true, "created_at": 1658399423658, "project_id": "proj1ab2c3d4", "metadata": { "color": "blue", "call_to_action": "Subscribe Now!" }, "packages": { "object": "list", "items": [ { "object": "package", "id": "pkge1a2b3c4d5", "lookup_key": "monthly", "display_name": "Monthly discounted with 3-day trial", "position": 1, "created_at": 1658399423658, "products": { "object": "list", "items": [ { "product": { "state": null, "object": null, "id": null, "store_identifier": null, "type": null, "subscription": null, "one_time": null, "created_at": null, "app_id": null, "app": null, "indicative_price": null, "display_name": null }, "eligibility_criteria": "all" } ], "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac", "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products" } } ], "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac", "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages" } } ], "next_page": "/v2/projects/proj1ab2c3d4/offerings?starting_after=ofrngeab21da", "url": "/v2/projects/proj1ab2c3d4/offerings" } ``` -------------------------------- ### 200 OK Response Sample for Package Details Source: https://www.revenuecat.com/docs/api-v2 This is a sample JSON response for a successful retrieval of package details. It includes information about the package, its associated products, and pagination details. ```json { "object": "package", "id": "pkge1a2b3c4d5", "lookup_key": "monthly", "display_name": "Monthly discounted with 3-day trial", "position": 1, "created_at": 1658399423658, "products": { "object": "list", "items": [ { "product": { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" }, "eligibility_criteria": "all" } ], "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac", "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products" } } ``` -------------------------------- ### Create Project Response Body Source: https://www.revenuecat.com/docs/api-v2 Example response body after successfully creating a new project. Includes project details like ID, name, and creation timestamp. ```json { "object": "project", "id": "proj1ab2c3d4", "name": "MagicWeather", "created_at": 1658399423658, "icon_url": "https://www.appatar.io/abc123/small", "icon_url_large": "https://www.appatar.io/abc123/large" } ``` -------------------------------- ### List Products Response Sample Source: https://www.revenuecat.com/docs/api-v2 This JSON object shows a successful response when listing products for a project. It includes a list of products with their details, state, type, and associated app information. ```json { "object": "list", "items": [ { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" } ], "next_page": "/v2/projects/proj1ab2c3d4/products?starting_after=prodab21dac", "url": "/v2/projects/proj1ab2c3d4/products" } ``` -------------------------------- ### Cancel Subscription API Request Example Source: https://www.revenuecat.com/docs/api-v2 This example demonstrates how to cancel an active Web Billing subscription. It requires the project ID and subscription ID as path parameters. Ensure you have the necessary 'customer_information:subscriptions:read_write' permission. ```bash curl -X POST \ https://api.revenuecat.com/v2/projects/{project_id}/subscriptions/{subscription_id}/actions/cancel \ ``` -------------------------------- ### 200 OK Response Sample for Offering Source: https://www.revenuecat.com/docs/api-v2 This is a sample JSON response for a successful retrieval of an offering. It includes details about the offering's state, packages, and associated products. ```json { "state": "active", "object": "offering", "id": "ofrnge1a2b3c4d5", "lookup_key": "default", "display_name": "The standard set of packages", "is_current": true, "created_at": 1658399423658, "project_id": "proj1ab2c3d4", "metadata": { "color": "blue", "call_to_action": "Subscribe Now!" }, "packages": { "object": "list", "items": [ { "object": "package", "id": "pkge1a2b3c4d5", "lookup_key": "monthly", "display_name": "Monthly discounted with 3-day trial", "position": 1, "created_at": 1658399423658, "products": { "object": "list", "items": [ { "product": { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": null } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" }, "eligibility_criteria": "all" } ], "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac", "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products" } } ], "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac", "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages" } } ``` -------------------------------- ### Get a list of projects Source: https://www.revenuecat.com/docs/api-v2 Retrieves a list of projects associated with the authenticated account. Supports pagination. ```APIDOC ## GET /projects ### Description Retrieves a list of projects. Supports pagination using `starting_after` and `limit` query parameters. ### Method GET ### Endpoint /projects ### Parameters #### Query Parameters - **starting_after** (string) - Optional - Used for pagination to get projects after a specific project ID. - **limit** (integer) - Optional - The maximum number of projects to return. Defaults to 20. ### Responses #### Success Response (200) Returns a list of projects. #### Error Responses - **400** - Bad request - **401** - Unauthorized - **403** - Access denied - **404** - Not found - **423** - Locked - **429** - Rate limit exceeded - **500** - Internal server error - **503** - Internal server error ### Response Example (200) ```json { "object": "list", "items": [ { "object": "project", "id": "proj1ab2c3d4", "name": "MagicWeather", "created_at": 1658399423658, "icon_url": "https://www.appatar.io/abc123/small", "icon_url_large": "https://www.appatar.io/abc123/large" } ], "next_page": "/v2/projects?starting_after=projab21dac", "url": "/v2/projects" } ``` ``` -------------------------------- ### Get a list of entitlements associated with a subscription Source: https://www.revenuecat.com/docs/api-v2 Lists all Entitlements granted by a Subscription. Supports pagination. ```APIDOC ## GET /v2/projects/{project_id}/subscriptions/{subscription_id}/entitlements ### Description Lists all Entitlements granted by a Subscription. Supports pagination. ### Method GET ### Endpoint /v2/projects/{project_id}/subscriptions/{subscription_id}/entitlements ### Parameters #### Path Parameters - **project_id** (string) - Required - ID of the project - **subscription_id** (string) - Required - ID of the subscription #### Query Parameters - **starting_after** (string) - Optional - Example: starting_after=ent12354 - **limit** (integer) - Optional - Default: 20 - Example: limit=10 ``` -------------------------------- ### Get Product Response Sample Source: https://www.revenuecat.com/docs/api-v2 This JSON object represents a product resource, detailing its state, ID, store identifier, and subscription details. It also includes information about the associated app and its indicative price. ```json { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" } ``` -------------------------------- ### Get Products for an Entitlement Source: https://www.revenuecat.com/docs/api-v2 Retrieves a list of products associated with a specific entitlement in a project. Supports pagination. ```json { "object": "list", "items": [ { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" } ], "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entla1b2c3d4e5/products?starting_after=prod1a2b3c4d5", "url": "/v2/projects/proj1ab2c3d4/entitlements/entla1b2c3d4e5/products" } ``` -------------------------------- ### Get Paywall by ID Source: https://www.revenuecat.com/docs/api-v2 Retrieves a specific paywall using its ID. Requires `project_configuration:offerings:read` permission. ```http GET https://api.revenuecat.com/v2/projects/{project_id}/paywalls/{paywall_id} ``` -------------------------------- ### Create a Package Source: https://www.revenuecat.com/docs/api-v2 Use this endpoint to create a new package within a specific offering. Ensure the request body includes the required lookup_key, display_name, and optionally, the position. ```json { "lookup_key": "monthly", "display_name": "monthly with one-week trial", "position": 1 } ``` -------------------------------- ### Response Sample for Products Source: https://www.revenuecat.com/docs/api-v2 This is a sample JSON response when retrieving a list of products associated with a package. It includes product details, eligibility criteria, and pagination information. ```json { "object": "list", "items": [ { "product": { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" }, "eligibility_criteria": "all" } ], "next_page": "/v2/projects/proj1ab2c3d4/packages/pkge1a2b3c4d5/products?starting_after=prod1a2b3c4d5", "url": "/v2/projects/proj1ab2c3d4/packages/pkge1a2b3c4d5/products" } ``` -------------------------------- ### Get Subscription Transactions Source: https://www.revenuecat.com/docs/api-v2 Retrieve a list of transactions for a specific subscription. This endpoint requires read permissions for subscriptions. ```http GET https://api.revenuecat.com/v2/projects/{project_id}/subscriptions/{subscription_id}/transactions ``` -------------------------------- ### App Response Sample Source: https://www.revenuecat.com/docs/api-v2 This is a sample JSON response when retrieving app details. ```json { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } } ``` -------------------------------- ### Get a list of the customer's attributes Source: https://www.revenuecat.com/docs/api-v2 Retrieves a list of attributes associated with a specific customer. Supports pagination. ```APIDOC ## Get a list of the customer's attributes get/projects/{project_id}/customers/{customer_id}/attributes ### Description Retrieves a list of attributes associated with a specific customer. Supports pagination. ### Method GET ### Endpoint https://api.revenuecat.com/v2/projects/{project_id}/customers/{customer_id}/attributes ### Parameters #### Path Parameters - **project_id** (string) - Required - ID of the project - **customer_id** (string) - Required - ID of the customer #### Query Parameters - **starting_after** (string) - Optional - Used for pagination. - **limit** (integer) - Optional - Default: 20. Specifies the number of results to return. ### Responses #### Success Response (200) - **object** (string) - Type of the response object, expected to be "list". - **items** (array) - An array of customer attribute objects. - **object** (string) - Type of the item, expected to be "customer.attribute". - **name** (string) - The name of the attribute. - **value** (string) - The value of the attribute. - **updated_at** (integer) - Timestamp of when the attribute was last updated. - **next_page** (string) - URL for the next page of results, if available. - **url** (string) - The URL for the current list of attributes. ### Response Example (200) ```json { "object": "list", "items": [ { "object": "customer.attribute", "name": "$email", "value": "garfield@revenuecat.com", "updated_at": 1658399423658 } ], "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/attributes?starting_after=myCustomAttribute", "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/attributes" } ``` ``` -------------------------------- ### Sample Subscription Response Source: https://www.revenuecat.com/docs/api-v2 This is a sample JSON response for a subscription object. It details the subscription's status, product information, entitlements, and associated revenue. ```json { "object": "subscription", "id": "sub1ab2c3d4e5", "customer_id": "19b8de26-77c1-49f1-aa18-019a391603e2", "original_customer_id": "19b8de26-77c1-49f1-aa18-019a391603e2", "product_id": "prod1a2b3c4d5e", "starts_at": 1658399423658, "current_period_starts_at": 1658399423658, "current_period_ends_at": 1658399423658, "ends_at": 1658399423658, "gives_access": true, "pending_payment": true, "auto_renewal_status": "will_renew", "status": "trialing", "total_revenue_in_usd": { "currency": "USD", "gross": 9.99, "commission": 2.99, "tax": 0.75, "proceeds": 6.25 }, "presented_offering_id": "ofrnge1a2b3c4d5", "entitlements": { "object": "list", "items": [ { "state": "active", "object": "entitlement", "project_id": "proj1ab2c3d4", "id": "entla1b2c3d4e5", "lookup_key": "premium", "display_name": "Premium", "created_at": 1658399423658, "products": { "object": "list", "items": [ { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" } ], "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac", "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products" } } ], "next_page": "/v2/projects/proj1ab2c3d4/subscriptions/sub1a2b3c4d5e/entitlements?status=active&starting_after=entlab21dac", "url": "/v2/projects/proj1ab2c3d4/subscriptions/sub1a2b3c4d5e/entitlements" }, "environment": "production", "store": "amazon", "store_subscription_identifier": 12345678, "ownership": "purchased", "pending_changes": { "product": { "state": "active", "object": "product", "id": "prod1a2b3c4d5e", "store_identifier": "rc_1w_199", "type": "subscription", "subscription": { "duration": "P1M", "grace_period_duration": "P3D", "trial_duration": "P1W" }, "one_time": { "is_consumable": true }, "created_at": 1658399423658, "app_id": "app1a2b3c4", "app": { "object": "app", "id": "app1a2b3c4", "name": "string", "created_at": 1658399423658, "type": "amazon", "project_id": "proj1a2b3c4", "amazon": { "package_name": "string" } }, "indicative_price": { "object": "indicative_price", "currency": "USD", "country": "US", "amount_micros": "For 99.99, the value should be 99990000" }, "display_name": "Premium Monthly 2023" }, "current_period_starts_at": 1658399423658, "current_period_ends_at": 1660991423658, "store_subscription_identifier": 12345679, "auto_renewal_status": "will_renew", "status": "active", "pending_payment": false, "gives_access": true }, "country": "US", "management_url": "https://apps.apple.com/account/subscriptions" } ``` -------------------------------- ### Get List of Paywalls Source: https://www.revenuecat.com/docs/api-v2 Retrieves a list of paywalls associated with a specific project. Supports pagination and expansion of offering details. ```APIDOC ## GET /v2/projects/{project_id}/paywalls ### Description Get a list of paywalls for a given project. ### Method GET ### Endpoint /v2/projects/{project_id}/paywalls ### Parameters #### Path Parameters - **project_id** (string) - Required - ID of the project. #### Query Parameters - **starting_after** (string) - Optional - Used for pagination, specifies the ID of the last item in the previous page. - **limit** (integer) - Optional - Default: 20 - The maximum number of paywalls to return. - **expand** (Array of strings) - Optional - Specifies which fields in the response should be expanded. Accepted values are: `items.offering`. ### Responses #### Success Response (200) - **object** (string) - Type of the object. - **items** (array) - A list of paywall objects. - Each item in the array is a paywall object with details like id, name, etc. #### Response Example (Response structure for 200 OK is not fully detailed in the source, but typically includes a list of paywall objects.) ### Error Responses - **400** Bad request - **401** Unauthorized - **403** Access denied - **404** Not found - **423** Locked - **429** Rate limit exceeded - **500** Internal server error - **503** Internal server error ```