Change subscription
Closes a running subscription and starts a new one according to the specification. Can be used for upgrades, downgrades, and plan changes.
Path parameters
ULID (Universally Unique Lexicographically Sortable Identifier).
Request body
Example request
{
"labels": {
"env": "test"
},
"customer": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"key": "019ae40f-4258-7f15-9491-842f42a7d6ac"
},
"plan": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"key": "resource_key"
},
"billing_anchor": "2023-01-01T01:01:01.001Z",
"timing": "2023-01-01T01:01:01.001Z"
}Response
The request has succeeded.
Example response
{
"current": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"plan_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"billing_anchor": "2023-01-01T01:01:01.001Z"
},
"next": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"plan_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"billing_anchor": "2023-01-01T01:01:01.001Z"
}
}Changes
Changed in 3 of the 75 revisions of this API.8
- ○
added the new optional request property
settlement_modenew-optional-request-property
- ○
added the optional property
current/settlement_modeto the response with the200statusresponse-optional-property-added
- ○
added the optional property
next/settlement_modeto the response with the200statusresponse-optional-property-added
This revision also has 23 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
the response property
current/created_atbecame required for the status200response-property-became-required
- ○
the response property
current/updated_atbecame required for the status200response-property-became-required
- ○
the response property
next/created_atbecame required for the status200response-property-became-required
- ○
the response property
next/updated_atbecame required for the status200response-property-became-required
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○