extensions / Commerce extension
POST
/api/projects/{project_id}/sales/subscription_groupsCreate Subscription Group
Creates a subscription group with optional nested subscriptions for a project.
GETPOST
Authentication
- Requirement
- Required
- Credential type
- Bearer API key
- Scopes
- Not specified
Permissions
- Requests are scoped to the target project_id. API-key requests must use a key with an active connection to that project.
Headers
| Name | Required | Type | Details |
|---|---|---|---|
Authorization | Yes | Not specified | Description: Bearer credential used to authenticate the request. |
Path Parameters
| Name | Required | Type | Details |
|---|---|---|---|
project_id | Yes | Not specified | Description: Target project identifier. |
Query Parameters
Request Body
Schema: SubscriptionGroupPayload
| Field | Required | Type | Details |
|---|---|---|---|
name | Yes | string | Description: Display name. |
discount_type | No | string | Description: Text value. |
discount_amount | No | JSON | Description: Numeric amount. |
discount_scope | No | string | Description: Text value. |
intro_duration | No | integer | Description: Integer value. |
intro_unit | No | string | Description: Text value. |
discount_target | No | string | Description: Text value. |
tax_enabled | No | boolean | Description: Boolean flag. |
require_payment_before_trial | No | boolean | Description: Boolean flag. |
refund_policy | No | JSON | Description: JSON object. |
upgrade_allowed | No | boolean | Description: Boolean flag. |
upgrade_charge_model | No | string | Description: Text value. |
upgrade_proration_window_days | No | integer | Description: Integer value. |
downgrade_allowed | No | boolean | Description: Boolean flag. |
downgrade_apply | No | string | Description: Text value. |
allow_multiple_subscriptions | No | boolean | Description: Boolean flag. |
subscriptions | No | array<SubscriptionPayload> | Description: Array value. Items: SubscriptionPayload |
Response Body
Example 200 response
json
{
"error": "string",
"success": [],
"id": 1
}Errors
Availability
- Available in
- v0.1.0
- Available since
- v0.1.0
- Implementation
- Available
- Deprecation
- Not specified
- Rate limits
- Not specified

