create_subscription
Create an auto-renewable subscription within a subscription group.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID |
groupId | string | Conditional | Existing subscription group ID |
newGroupName | string | Conditional | Create new group with this name |
productId | string | Yes | Unique product ID |
name | string | Yes | Reference name |
subscriptionPeriod | string | Yes | ONE_WEEK, ONE_MONTH, TWO_MONTHS, THREE_MONTHS, SIX_MONTHS, ONE_YEAR |
groupLevel | number | No | Service level (1 = highest tier, default: 1) |
familyShareable | boolean | No | Enable family sharing (default: false) |
Subscription Groups
Provide either groupId to add to an existing group, or newGroupName to create a new subscription group. Users can only have one active subscription per group.
Example Usage
Natural Language Promptstext
"Create a monthly premium subscription at $9.99""Add an annual subscription to the Premium group""Create a new Pro subscription group with monthly and yearly options"
Response
{"success": true,"group": {"id": "group_xyz","referenceName": "Premium","syncStatus": "pending_creation"},"subscription": {"id": "sub_abc123","productId": "com.app.premium_monthly","name": "Premium Monthly","subscriptionPeriod": "ONE_MONTH","groupLevel": 1,"syncStatus": "pending_creation"}}