Add a Subscriptions tab in user settings
Pricing
from $3.00 / 1,000 results
Add a Subscriptions tab in user settings
Add a Subscriptions tab in user settings, a repetitive task that could be automated with a tool.
Pricing
from $3.00 / 1,000 results
Rating
0.0
(0)
Developer
Lore Nest
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 hours ago
Last modified
Categories
Share
Add a Subscriptions tab in user settings, a repetitive task that could be automated with a tool.
This Actor automates the generation of a "Subscriptions" tab configuration for a user settings interface, transforming raw subscription records into a structured, UI-ready payload. Instead of manually formatting subscription data each time a settings panel needs to be rendered, the tool accepts a JSON payload and returns a normalized configuration object containing tab metadata, formatted subscription items, and component props ready to be consumed by a frontend.
Use Cases
- Settings UI bootstrapping: Quickly produce a complete tab configuration object from a list of subscription records (id, name, status, next_billing) so a frontend component can render without extra data wrangling.
- Active subscription counting for headers: Generate a tab header summary by counting only subscriptions whose status equals
"active", useful for showing badges like "3 active subscriptions" on the tab. - Display name normalization: Convert raw plan names into uppercase display labels and capitalize status fields (e.g.,
"premium plan"→"PREMIUM PLAN","active"→"Active") for consistent UI presentation. - Empty state handling: Detect when the subscriptions array is empty and include an
"empty_state_message"field ("No subscriptions found.") in the component props, allowing the UI to render a fallback when a user has no subscriptions. - Theme and billing history toggling: Pass through UI preferences such as
themeandshow_billing_historyfrom the input into the resultingcomponent_props.settings, so a settings panel can be rendered with the correct visual configuration per user.
How It Works
The Actor reads three top-level keys from the input payload: user_id, subscriptions, and ui_config. It iterates over each subscription record and maps it to a frontend-friendly shape with display_name (uppercased), status_label (capitalized), next_date, and internal_id. It then counts how many subscriptions have a status of "active" to populate the tab's metadata summary. Finally, it assembles a result object containing the tab_id, tab_title, metadata block, and component_props (which bundle the formatted items, the user's UI settings, and an optional empty-state message), returning the complete configuration for downstream rendering. If the payload contains a dry_run flag, the function short-circuits and returns a text summary instead of the full config object.
Usage on Apify
Run it directly from the Apify Console ("Start"/"Try for free"), or call it via the API:
POST https://api.apify.com/v2/acts/add-subscriptions-tab-in-user-settings/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>Content-Type: application/json{}
Pricing
Pay-per-event, billed automatically by Apify -- no separate account or payment step:
- Actor start: $0.00005 per GB of memory (minimum one event per run)
- Result: $0.005 per item returned -- this is the primary, usage-based charge
Also independently available at $0.0100 USDC (Base) per call via the x402 payment protocol (POST /tools/add-subscriptions-tab-in-user-settings) for callers outside the Apify platform.
Example output
Real output captured from this tool's own build-time smoke test (input above):
{"tab_id": "subscriptions_tab","tab_title": "Subscriptions","metadata": {"user_id": "unknown","active_subscriptions_count": 0,"generated_at": "automated_task"},"component_props": {"items": [],"settings": {},"empty_state_message": "No subscriptions found."}}


