Handle subscription changed
const url = 'https://example.com/api/v1/provision/admin/billing-events/subscription-changed';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"externalReference":"example","accountExternalReference":"example","customerEmail":"example","customerName":"example","changeType":"Created","status":"Unknown","entitlementOfferKey":"example","entitlementOfferVersion":"example","planName":"example","addOnCodes":["example"],"quantity":1,"startsAt":"2026-04-15T12:00:00Z","endsAt":"2026-04-15T12:00:00Z","isDeleted":true,"currentPeriodEndsAt":"2026-04-15T12:00:00Z","trialEndsAt":"2026-04-15T12:00:00Z","latestInvoicePaid":true,"targetEntitlementId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","originReference":"example","policy":{"requirePaidInvoice":true,"pastDue":"Pause","pastDueGrace":"PT15M","canceled":"Disable","canceledPlanName":"example","applyPlanOnUpdate":true},"wasPastDue":true,"sourceEventId":"example","observedAt":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/provision/admin/billing-events/subscription-changed \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "externalReference": "example", "accountExternalReference": "example", "customerEmail": "example", "customerName": "example", "changeType": "Created", "status": "Unknown", "entitlementOfferKey": "example", "entitlementOfferVersion": "example", "planName": "example", "addOnCodes": [ "example" ], "quantity": 1, "startsAt": "2026-04-15T12:00:00Z", "endsAt": "2026-04-15T12:00:00Z", "isDeleted": true, "currentPeriodEndsAt": "2026-04-15T12:00:00Z", "trialEndsAt": "2026-04-15T12:00:00Z", "latestInvoicePaid": true, "targetEntitlementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "originReference": "example", "policy": { "requirePaidInvoice": true, "pastDue": "Pause", "pastDueGrace": "PT15M", "canceled": "Disable", "canceledPlanName": "example", "applyPlanOnUpdate": true }, "wasPastDue": true, "sourceEventId": "example", "observedAt": "2026-04-15T12:00:00Z" }'A subscription changed: provisions, binds, updates or ends the entitlement it anchors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”An id of your own for the call. The answer returns it in the same header, and the server log carries it; when you send none, the server makes one.
Request Bodyrequired
Section titled “Request Bodyrequired”A subscription as your billing system sees it — the event a built-in connector publishes, posted by
yours. Every reference is scheme:kind:id, the scheme naming your billing system.
object
The subscription, e.g. chargebee:subscription:AzZ9...: the anchor its entitlement is found by.
The customer it belongs to, e.g. chargebee:customer:16BQ....
The name of the entitlement offer an unknown subscription is provisioned from, when it names no target: the offer’s name alone, not name@version. Send the optional version in entitlementOfferVersion. An unknown offer is not provisioned and adds a warning to the Audit log.
The plan the subscription pays for.
Non-empty makes this an add-on subscription: it grants these add-ons on the target and never changes its plan.
When the current billing period ends: the subscription’s next renewal. Not its end, which is endsAt.
When your trial ends; only while the status is Trialing.
An entitlement of yours the subscription binds to instead of provisioning one.
The record the entitlement is created from, when your system is its system of record.
How this event is applied. Leave it out, or any field of it, for the defaults: the plan follows every change, and a failed payment keeps the license working for seven days.
object
Provision, and apply the plan of, an active subscription only once its latest invoice is paid. Default: false.
How long a past-due subscription keeps working under PauseAfter: an ISO 8601 duration of whole days, from P1D to P90D. Default: P7D.
Example
PT15MThe plan a cancellation moves the entitlement to under ApplyPlan.
Apply the event’s planName on every event, not only the first. Set it to false to protect plan work done by hand. Default: true.
Your id for this change. A repeat of the last one applied changes nothing.
When your system observed this state. Anything observed before the last one applied changes nothing.
Responses
Section titled “Responses”Accepted
The event was accepted and published; its consumer applies it shortly after.
object
Examplegenerated
{ "eventId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
Bad Request
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
Unauthorized
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
How to authenticate: the bearer challenge.
Forbidden
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
Not Found
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
Conflict
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The body is not sent as application/json (request.unsupported).
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
Too many requests. Wait the seconds in Retry-After, then send the call again (service.too-many-requests).
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The seconds to wait before the call is sent again.
The calls the limiter allows in its window, when it knows.
The calls left in the window, when the limiter knows.
The seconds until the window resets, when the limiter knows.
Names the limiter that shed the call.