Create Subscription
chargebee.create_subscription
ActionCRM & salesconnection required
Calls the Chargebee API with the connection's credentials.
Subscribe an existing customer to one or more item prices.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Chargebee
- Secret shape
- the site API key: the raw string, {"api_key": "…"}, or the HTTP Basic pair {"username": "<api key>", "password": ""}
- Config it needs
- site, base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
7 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
customer_id The Chargebee customer id. | string | Yes | — | — | — |
subscription_items What the customer is subscribing to, as a JSON array of {"item_price_id": "basic-USD-monthly", "quantity": 1} objects. | array | Yes | — | ≥ 1 characters; array of object | [{"item_price_id":"basic-USD-monthly","quantity":1}] |
subscription_id The id to give the new subscription. Leave empty and Chargebee generates one. | string | No | — | ≤ 50 characters | — |
start_date When the subscription should start, as a Unix timestamp in seconds (UTC). Leave empty to start it immediately. | number | No | — | ≥ 0 | — |
coupon_ids Coupon ids to apply, as a JSON array of strings, e.g. ["SAVE10"]. | array | No | — | array of string | — |
extra Any other parameter documented for this endpoint, merged into the request body. Nested objects and arrays are form-encoded the way Chargebee documents them, e.g. {"billing_address": {"city": "Walnut"}}. | object | No | — | — | {"billing_address":{"city":"Walnut"}} |
idempotency_key A unique value sent as 'chargebee-idempotency-key' so a retry inside Chargebee's 30-minute window replays the first response instead of charging or creating twice. | string | No | — | ≤ 100 characters | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"extra": {
"billing_address": {
"city": "Walnut"
}
},
"subscription_items": [
{
"item_price_id": "basic-USD-monthly",
"quantity": 1
}
]
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
subscription The subscription resource as Chargebee returned it. | object | — |
customer The customer the subscription belongs to. | object | — |
card The card on the customer, when one is on file. | object | — |
invoice The invoice this change raised, present only when Chargebee billed immediately. | object | — |
unbilled_charges Charges the change created but did not invoice yet; an empty or absent list means everything was billed. | array | — |
{
"card": {},
"customer": {},
"invoice": {},
"subscription": {},
"unbilled_charges": []
}Notes
- The Chargebee site and API key come from the connection; every path below is relative to https://<site>.chargebee.com/api/v2.
- POST /customers/{customer-id}/subscription_for_items
See Create Subscription run in a workflow.
In a technical demo we add the Chargebee connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.