Skip to main content
POST
Create a subscription

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The subscription to create

plan
string
required

Plan ID

Example:

"pln_mi4f0oda6x9m7gcsvjk0ole1"

customer
Person · object
required
address
object
required
meter
object
required
payment_method
object
required
next_possible_start
boolean
required

If set to false we will request the cancellation of the previous supplier / grid operator signup to the date provided in intended_start_date. If set to true we will request the next possible date.

Example:

true

previous_supplier
string

ID of the previous supplier, possible to obtain via /suppliers. Only supported for consumption plans.

Example:

"mp_mi4f0oda6x9m7gcsvjk0ole1"

intended_start_date
string<date>

Intended start date of the subscription. Must be a date in the future. For feed-in plans it must be the first day of a month, at least one month in the future; when omitted, the next possible production start date is used.

Example:

"2024-01-01"

lead
string

Lead to track attribution of the subscription

Example:

"lead_mi4f0oda6x9m7gcsvjk0ole1"

product_orders
object[]

Array of additional product orders. Each item has a 'type' and may include an additional object with the same name as the type for its details. Only supported for consumption plans: §14a EnWG does not apply to feed-in, and feed-in requires a smart meter before signup.

Example:
metadata
object | null

Metadata of the subscription. Store any type of information, custom to your needs. E.g. the user_id of your in-house user. Restricted to 10KB.

Example:

Response

The created subscription details

object
enum<string>
required

Type of the object, always 'subscription'

Available options:
subscription
id
string
required

Unique identifier for the subscription

Example:

"sub_rocbrf1u5e48mm0reeqoag90"

plan
string
required

ID of the plan

Example:

"pln_ctj3tjzc7dywznuw1dy80lb3"

customer
string
required

ID of the customer

Example:

"cus_a8n8ol7yd4h0wohx824f0bui"

address
string
required

ID of the address

Example:

"adr_a7gurqkul8lzzsy1pf9p9388"

meter
string
required

ID of the meter

Example:

"mtr_azk4zue2ijx4ff1dbjt14m5h"

payment_method
string
required

ID of the payment method

Example:

"pm_adc9utqqpcp7tx054l7vg56s2"

status
enum<string>
required

Status of the subscription

Available options:
pending,
active,
ended
Example:

"active"

estimated_usage
number
required

Estimated yearly usage in kWh, provided by the customer in the checkout.

created_at
required

Timestamp when the subscription was created

Example:

"2024-03-14T12:00:00Z"

updated_at
required

Timestamp when the subscription was updated

Example:

"2024-03-14T12:00:00Z"

supplier
string | null

ID of the previous supplier

Example:

"mp_a0x6jm5h92wde6s5dnuvha4c"

number
string | null

Human-readable identifier for the subscription

Example:

"4X44EMKX"

start_at

Timestamp when delivery was started / will start

Example:

"2024-03-14T12:00:00Z"

terminated_at

Timestamp when delivery was terminated

Example:

"2024-03-14T12:00:00Z"

end_at

Timestamp when the subscription was ended / will end

Example:

"2024-03-14T12:00:00Z"

metadata
object | null

Metadata of the subscription. Store any type of information, custom to your needs. E.g. the user_id of your in-house user. Restricted to 10KB.

Example: