Issue Removing Blocking State on Subscription Bundle

25 views
Skip to first unread message

Pardos Dedondo

unread,
May 15, 2025, 12:32:16 PMMay 15
to Kill Bill users mailing-list

Good evening,

We encountered an issue while attempting to remove a blocking state from a subscription bundle.

We initially created a new bundle with a subscription on an account where AUTO_INVOICE was set to OFF. Subsequently, we applied a blocking state to this bundle using the /bundles/:bundleId/block API with the following parameters:

```json
{ "stateName": "custom", "service": "internal", "isBlockBilling": true, "isBlockEntitlement": true, "type": "SUBSCRIPTION_BUNDLE" }
```

To remove this blocking state, we then called the same API with this body:

```json
{ "stateName": "custom2", "service": "internal", "isBlockChange": false, "isBlockEntitlement": false, "isBlockBilling": false, "effectiveDate": "2024-05-12T00:22:30.376Z", "type": "SUBSCRIPTION_BUNDLE" }
```

A subsequent GET request on the bundle indicates that the subscription's state has changed to ACTIVE. However, after setting AUTO_INVOICE to ON for the account, we encountered the following error when attempting to add an ADD_ON:

The action Entitlement is block on this Subscription with id=...

It appears that the subscription remains blocked despite our attempt to remove the blocking state. Consequently, we are unable to generate a bill for this bundle.

Could you please assist us in resolving this issue?

Thank you for your time and support.

karan bansal

unread,
May 15, 2025, 3:54:46 PMMay 15
to Kill Bill users mailing-list
Hi Pardos,

Could you kindly use the endpoint : accounts/accountID/block?blockingStateTypes=SUBSCRIPTION_BUNDLE and share the output. 

Regards
Karan

Pardos Dedondo

unread,
May 16, 2025, 4:21:39 AMMay 16
to Kill Bill users mailing-list

Hi Pardos,

Here are the info you requested. I added the GET blockingStates and a GET bundle by ID before and after the unblock attempt.

--> This is the GET bundle by ID before unblock

{ "accountId": "ab5202fb-9e93-4260-9038-7440fbad607c", "bundleId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "externalKey": "bundle_ext_key_20231122_36", "subscriptions": [ { "accountId": "ab5202fb-9e93-4260-9038-7440fbad607c", "bundleId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "bundleExternalKey": "bundle_ext_key_20231122_36", "subscriptionId": "d57cd423-bf57-4fac-b25d-e54355788059", "externalKey": "bundle_ext_key_20231122_36", "startDate": "2024-05-12", "productName": "GPON", "productCategory": "BASE", "billingPeriod": "MONTHLY", "phaseType": "EVERGREEN", "priceList": "DEFAULT", "planName": "CAN000001", "state": "BLOCKED", "sourceType": "NATIVE", "cancelledDate": null, "chargedThroughDate": null, "billingStartDate": "2024-05-12", "billingEndDate": null, "billCycleDayLocal": 1, "events": [ { "eventId": "1e899589-b6d7-49af-b03c-6877dd526f96", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "START_ENTITLEMENT", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "entitlement-service", "serviceStateName": "ENT_STARTED", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e2b79f4d-bd86-4290-bbd4-2a4328c0c954", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "START_BILLING", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "billing-service", "serviceStateName": "START_BILLING", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e6f852f1-8d8c-4995-9542-30ca1cb0c3fd", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "PAUSE_ENTITLEMENT", "isBlockedBilling": true, "isBlockedEntitlement": true, "serviceName": "internal", "serviceStateName": "custom", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e6f852f1-8d8c-4995-9542-30ca1cb0c3fd", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "PAUSE_BILLING", "isBlockedBilling": true, "isBlockedEntitlement": true, "serviceName": "internal", "serviceStateName": "custom", "phase": "CAN000001-evergreen", "auditLogs": [] } ], "priceOverrides": null, "prices": [ { "planName": "CAN000001", "phaseName": "CAN000001-evergreen", "phaseType": "EVERGREEN", "fixedPrice": null, "recurringPrice": 8.5, "usagePrices": [] } ], "auditLogs": [] } ], "timeline": { "accountId": "ab5202fb-9e93-4260-9038-7440fbad607c", "bundleId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "externalKey": "bundle_ext_key_20231122_36", "events": [ { "eventId": "1e899589-b6d7-49af-b03c-6877dd526f96", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "START_ENTITLEMENT", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "entitlement-service", "serviceStateName": "ENT_STARTED", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e2b79f4d-bd86-4290-bbd4-2a4328c0c954", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "START_BILLING", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "billing-service", "serviceStateName": "START_BILLING", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e6f852f1-8d8c-4995-9542-30ca1cb0c3fd", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "PAUSE_ENTITLEMENT", "isBlockedBilling": true, "isBlockedEntitlement": true, "serviceName": "internal", "serviceStateName": "custom", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e6f852f1-8d8c-4995-9542-30ca1cb0c3fd", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "PAUSE_BILLING", "isBlockedBilling": true, "isBlockedEntitlement": true, "serviceName": "internal", "serviceStateName": "custom", "phase": "CAN000001-evergreen", "auditLogs": [] } ], "auditLogs": [] }, "auditLogs": [] }

--> This is the GET blockingStates BEFORE the unlock

[ { "blockedId": "91765f52-b11b-43d1-83b8-ea86c5253cb9", "stateName": "custom", "service": "internal", "isBlockChange": false, "isBlockEntitlement": true, "isBlockBilling": true, "effectiveDate": "2024-05-12T13:03:17.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] }, { "blockedId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "stateName": "custom", "service": "internal", "isBlockChange": false, "isBlockEntitlement": true, "isBlockBilling": true, "effectiveDate": "2024-05-12T13:03:17.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] }, { "blockedId": "91765f52-b11b-43d1-83b8-ea86c5253cb9", "stateName": "custom2", "service": "internal", "isBlockChange": true, "isBlockEntitlement": false, "isBlockBilling": false, "effectiveDate": "2025-05-15T15:37:28.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] }, { "blockedId": "91765f52-b11b-43d1-83b8-ea86c5253cb9", "stateName": "ENT_CLEAR", "service": "entitlement-service", "isBlockChange": false, "isBlockEntitlement": false, "isBlockBilling": false, "effectiveDate": "2025-05-15T15:41:22.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] } ]

--> This is the GET bundle by ID after unblock attempt

{ "accountId": "ab5202fb-9e93-4260-9038-7440fbad607c", "bundleId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "externalKey": "bundle_ext_key_20231122_36", "subscriptions": [ { "accountId": "ab5202fb-9e93-4260-9038-7440fbad607c", "bundleId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "bundleExternalKey": "bundle_ext_key_20231122_36", "subscriptionId": "d57cd423-bf57-4fac-b25d-e54355788059", "externalKey": "bundle_ext_key_20231122_36", "startDate": "2024-05-12", "productName": "GPON", "productCategory": "BASE", "billingPeriod": "MONTHLY", "phaseType": "EVERGREEN", "priceList": "DEFAULT", "planName": "CAN000001", "state": "ACTIVE", "sourceType": "NATIVE", "cancelledDate": null, "chargedThroughDate": null, "billingStartDate": "2024-05-12", "billingEndDate": null, "billCycleDayLocal": 1, "events": [ { "eventId": "1e899589-b6d7-49af-b03c-6877dd526f96", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "START_ENTITLEMENT", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "entitlement-service", "serviceStateName": "ENT_STARTED", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e2b79f4d-bd86-4290-bbd4-2a4328c0c954", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "START_BILLING", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "billing-service", "serviceStateName": "START_BILLING", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e6f852f1-8d8c-4995-9542-30ca1cb0c3fd", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "PAUSE_ENTITLEMENT", "isBlockedBilling": true, "isBlockedEntitlement": true, "serviceName": "internal", "serviceStateName": "custom", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e6f852f1-8d8c-4995-9542-30ca1cb0c3fd", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "PAUSE_BILLING", "isBlockedBilling": true, "isBlockedEntitlement": true, "serviceName": "internal", "serviceStateName": "custom", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "7da9cda0-102f-4a7c-975a-b9dc0cd6e7a3", "billingPeriod": "MONTHLY", "effectiveDate": "2025-05-16", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "RESUME_ENTITLEMENT", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "internal", "serviceStateName": "custom2", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "7da9cda0-102f-4a7c-975a-b9dc0cd6e7a3", "billingPeriod": "MONTHLY", "effectiveDate": "2025-05-16", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "RESUME_BILLING", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "internal", "serviceStateName": "custom2", "phase": "CAN000001-evergreen", "auditLogs": [] } ], "priceOverrides": null, "prices": [ { "planName": "CAN000001", "phaseName": "CAN000001-evergreen", "phaseType": "EVERGREEN", "fixedPrice": null, "recurringPrice": 8.5, "usagePrices": [] } ], "auditLogs": [] } ], "timeline": { "accountId": "ab5202fb-9e93-4260-9038-7440fbad607c", "bundleId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "externalKey": "bundle_ext_key_20231122_36", "events": [ { "eventId": "1e899589-b6d7-49af-b03c-6877dd526f96", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "START_ENTITLEMENT", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "entitlement-service", "serviceStateName": "ENT_STARTED", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e2b79f4d-bd86-4290-bbd4-2a4328c0c954", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "START_BILLING", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "billing-service", "serviceStateName": "START_BILLING", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e6f852f1-8d8c-4995-9542-30ca1cb0c3fd", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "PAUSE_ENTITLEMENT", "isBlockedBilling": true, "isBlockedEntitlement": true, "serviceName": "internal", "serviceStateName": "custom", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "e6f852f1-8d8c-4995-9542-30ca1cb0c3fd", "billingPeriod": "MONTHLY", "effectiveDate": "2024-05-12", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "PAUSE_BILLING", "isBlockedBilling": true, "isBlockedEntitlement": true, "serviceName": "internal", "serviceStateName": "custom", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "7da9cda0-102f-4a7c-975a-b9dc0cd6e7a3", "billingPeriod": "MONTHLY", "effectiveDate": "2025-05-16", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "RESUME_ENTITLEMENT", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "internal", "serviceStateName": "custom2", "phase": "CAN000001-evergreen", "auditLogs": [] }, { "eventId": "7da9cda0-102f-4a7c-975a-b9dc0cd6e7a3", "billingPeriod": "MONTHLY", "effectiveDate": "2025-05-16", "plan": "CAN000001", "product": "GPON", "priceList": "DEFAULT", "eventType": "RESUME_BILLING", "isBlockedBilling": false, "isBlockedEntitlement": false, "serviceName": "internal", "serviceStateName": "custom2", "phase": "CAN000001-evergreen", "auditLogs": [] } ], "auditLogs": [] }, "auditLogs": [] }

--> This is the GET blockingStates AFTER the unblock attempt

[ { "blockedId": "91765f52-b11b-43d1-83b8-ea86c5253cb9", "stateName": "custom", "service": "internal", "isBlockChange": false, "isBlockEntitlement": true, "isBlockBilling": true, "effectiveDate": "2024-05-12T13:03:17.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] }, { "blockedId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "stateName": "custom", "service": "internal", "isBlockChange": false, "isBlockEntitlement": true, "isBlockBilling": true, "effectiveDate": "2024-05-12T13:03:17.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] }, { "blockedId": "91765f52-b11b-43d1-83b8-ea86c5253cb9", "stateName": "custom2", "service": "internal", "isBlockChange": true, "isBlockEntitlement": false, "isBlockBilling": false, "effectiveDate": "2025-05-15T15:37:28.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] }, { "blockedId": "91765f52-b11b-43d1-83b8-ea86c5253cb9", "stateName": "ENT_CLEAR", "service": "entitlement-service", "isBlockChange": false, "isBlockEntitlement": false, "isBlockBilling": false, "effectiveDate": "2025-05-15T15:41:22.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] }, { "blockedId": "42977390-dcab-4dbb-bb2c-6244896b97c3", "stateName": "custom2", "service": "internal", "isBlockChange": false, "isBlockEntitlement": false, "isBlockBilling": false, "effectiveDate": "2025-05-16T07:53:56.000Z", "type": "SUBSCRIPTION_BUNDLE", "auditLogs": [] } ]
What I noticed is that the effectiveDate of the unblock event reflects the date the operation was executed, rather than the date I specified in the request body.
{ "stateName": "custom2", "service": "internal", "isBlockChange": false, "isBlockEntitlement": false, "isBlockBilling": false, "effectiveDate": "2024-05-12T13:03:17.000Z", "type": "SUBSCRIPTION_BUNDLE" }

Pardos Dedondo

unread,
May 16, 2025, 4:39:33 AMMay 16
to Kill Bill users mailing-list

Hi,

I ran a test by adding the requestedDate query parameter, and it seems to be working!
Could you please confirm if the missing parameter was indeed the cause of the issue?

Thanks for your support,
Pardos


karan bansal

unread,
May 16, 2025, 8:59:02 AMMay 16
to Kill Bill users mailing-list
Hi Pardos,

Yes, that was my idea when I saw your initial email. That is the reason I had requested to see the blocking states. The scenario worked fine when I tested and I had passed the dates while creating the block/unblock state.

Regards
Karan

Reply all
Reply to author
Forward
0 new messages