dryRun api for upcoming invoice

17 views
Skip to first unread message

Vivek Manpuria (Vivek)

unread,
Jul 31, 2025, 3:33:18 AMJul 31
to Kill Bill users mailing-list
Hi Team,

I noticed that the chargedThroughDate date is null sometimes even after the payment is successful. In those case, when the dryRun api is called, I noticed the following error for one account only:

{ "message": "SAFETY BOUND TRIGGERED subscriptionId='04077d45-ac29-414b-9cf8-1f72a5cc747d', resultingItem=RECURRING{productName='hulu_qa.16106c36-5635-4e10-b30f-d60bc6c52188', planName='_16106c36-5635-4e10-b30f-d60bc6c52188', phaseName='_16106c36-5635-4e10-b30f-d60bc6c52188-evergreen', usageName='null', startDate=2025-08-08, endDate=2025-08-09, amount=2.00, subscriptionId=04077d45-ac29-414b-9cf8-1f72a5cc747d, rate=2.00, linkedItemId=null}" }

Please let me know if you would like further details.

Here is the account subscription details:
{
"accountId": "554ce5e4-a6d0-4fe7-b910-4592f7f4f978",
"bundleId": "ca27e979-bd2e-4412-b726-17ed9d3c3d7d",
"bundleExternalKey": "4d4a6e970118e91ccf9806c4dbb95d5e",
"subscriptionId": "f2ef5abb-2ec4-479a-82b1-8c73dd00af92",
"externalKey": "f2ef5abb-2ec4-479a-82b1-8c73dd00af92",
"startDate": "2025-07-23T09:11:55.000Z",
"productName": "hulu_qa.604ab044-79f4-450f-95f8-c33707374fb1",
"productCategory": "STANDALONE",
"billingPeriod": "MONTHLY",
"phaseType": "EVERGREEN",
"priceList": "DEFAULT",
"planName": "_604ab044-79f4-450f-95f8-c33707374fb1",
"state": "ACTIVE",
"sourceType": "NATIVE",
"cancelledDate": null,
"chargedThroughDate": null,
"billingStartDate": "2025-07-23T09:11:55.000Z",
"billingEndDate": null,
"billCycleDayLocal": 23,
"quantity": 1,
"events": [
{
"eventId": "ab7ce51b-86c2-4f69-a9a8-ad5a92a6dacd",
"billingPeriod": "MONTHLY",
"effectiveDate": "2025-07-23T09:11:55.000Z",
"catalogEffectiveDate": "2025-06-06T00:00:01.000Z",
"plan": "_604ab044-79f4-450f-95f8-c33707374fb1",
"product": "hulu_qa.604ab044-79f4-450f-95f8-c33707374fb1",
"priceList": "DEFAULT",
"eventType": "START_ENTITLEMENT",
"isBlockedBilling": false,
"isBlockedEntitlement": false,
"serviceName": "entitlement-service",
"serviceStateName": "ENT_STARTED",
"phase": "_604ab044-79f4-450f-95f8-c33707374fb1-evergreen",
"auditLogs": []
},
{
"eventId": "925dc40d-4e3c-4cba-99c5-e1252dec0909",
"billingPeriod": "MONTHLY",
"effectiveDate": "2025-07-23T09:11:55.000Z",
"catalogEffectiveDate": "2025-06-06T00:00:01.000Z",
"plan": "_604ab044-79f4-450f-95f8-c33707374fb1",
"product": "hulu_qa.604ab044-79f4-450f-95f8-c33707374fb1",
"priceList": "DEFAULT",
"eventType": "START_BILLING",
"isBlockedBilling": false,
"isBlockedEntitlement": false,
"serviceName": "billing-service",
"serviceStateName": "START_BILLING",
"phase": "_604ab044-79f4-450f-95f8-c33707374fb1-evergreen",
"auditLogs": []
}
],
"priceOverrides": null,
"prices": [
{
"planName": "_604ab044-79f4-450f-95f8-c33707374fb1",
"phaseName": "_604ab044-79f4-450f-95f8-c33707374fb1-evergreen",
"phaseType": "EVERGREEN",
"fixedPrice": null,
"recurringPrice": 15.00,
"usagePrices": []
}
],
"auditLogs": []
}

Thank you,
Vivek

stephane brossier

unread,
Jul 31, 2025, 11:22:58 AMJul 31
to Vivek Manpuria (Vivek), Kill Bill users mailing-list
Do you have a clear scenario (clear steps to run, expected outcome, observed result) to share?

Also, CTD is unrelated to payment, it is set at the time of invoicing for in-advance scenarios.


--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/killbilling-users/a976d4cd-7cf4-4378-a78f-fb394d006c0dn%40googlegroups.com.

Vivek Manpuria (Vivek)

unread,
Aug 2, 2025, 2:20:05 AMAug 2
to Kill Bill users mailing-list
This issue is reproducible. Here are the steps:
1. Create Subscription API
2. DryRun API  to get upcoming-invoice

After Step 2, the NullPointerException log is observed.

I do not know how this account got into this state. I can look at the old logs to find out.

The plan is configured to bill in advance. Still, the chargeThruDate for this account has been null since the time the subscription was created few weeks ago. 

Thank you,
Vivek

karan bansal

unread,
Aug 3, 2025, 11:38:31 AMAug 3
to Kill Bill users mailing-list
Hi Vivek,

I used the catalog-new that you had shared in the other thread and created a subscription starting 23rd July based on the data I see above. The CTD showed up correctly. Then I tried to remove the CTD for the subscription from the db. After removing the CTD, I tried the dry run as well as manual generation of the invoice and that too worked fine. After generating the next invoice, the CTD got correctly updated. 

Could you try to generate the next invoice manually and let me know if that updates the CTD. 

Regards
Karan

Reply all
Reply to author
Forward
0 new messages