Skip to main content
PATCH
Update a subscription

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required
Example:

"sub_mi4f0oda6x9m7gcsvjk0ole1"

Body

application/json

The subscription fields to update

billing_address
object

New billing address for the subscription

payment_method
object

Attach a new SEPA direct-debit mandate. The new payment method replaces the subscription's current mandate.

metadata
object | null

Key-based metadata update. Keys sent here are merged onto the stored metadata; set a key to null to remove it. Send metadata: null to clear every key. Omit the field to leave the metadata unchanged. The resulting metadata is restricted to 10KB.

Example:

Response

The updated subscription

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
Person · object
required
address
object
required
meter
object
required
payment_method
object
required
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"

type
enum<string>
required

Whether the subscription covers electricity consumption or feed-in. Feed-in subscriptions are only available from the 2026-05-27.curie API version onwards.

Available options:
consumption,
feed_in
Example:

"consumption"

billing_address
object
required
supplier
object | null
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: