Assistance Needed: External Payment Posting Not Updating Invoice Balance in Kill Bill

11 views
Skip to first unread message

Harish K

unread,
Dec 14, 2025, 6:16:54 PM (7 days ago) Dec 14
to killbill...@googlegroups.com

Hello everyone,

We are integrating Kill Bill with our subscription backend, and I would appreciate some guidance from the community regarding one part of the renewal flow.


 Current Flow Implementation

Our system has the following sequence for subscription creation and renewal:

1. Subscription Creation

  • We create an account in Kill Bill (child account) and link it to a parent billing account when applicable.

  • A subscription is created using the requested plan.

  • Kill Bill generates an invoice on the billing account based on catalog rules.

2. Renewal / Invoice Initiation

  • Before renewal, our backend checks the active subscription status.

  • A future invoice is generated for the correct billing account.

  • We use the invoice balance to initiate the external payment (PayU).

3. External Payment Callback

When PayU sends a callback to our backend, we:

  1. Validate the callback signature

  2. Load the subscription and the corresponding billing account

  3. Fetch invoices associated with that account

  4. Identify the pending invoice for renewal

  5. Build a PaymentTransaction for external payment

  6. Post the external payment to Kill Bill using:

    POST /1.0/kb/invoices/{invoiceId}/payments?externalPayment=true

Our expectation is that Kill Bill will record this payment and update the invoice balance accordingly.


 Issue Observed

Even though:

  • The subscription is created successfully

  • The renewal invoice is generated

  • The external payment gateway reports a successful transaction

  • The callback handler runs without throwing any exceptions

The invoice balance in Kill Bill does not change, and there is no payment reflected under the account or invoice.

Additionally, in the Kill Bill container logs, we do not see any entries indicating that an external payment was applied, nor do we see errors coming from the payment API.

So the issue appears to be that the external payment call is not being processed or is not reaching the correct invoice/account within Kill Bill, despite being invoked from our backend.


 What We Are Trying to Understand

  1. Is there any known behavior where external payments may be silently ignored or not applied unless certain account or invoice conditions are met?

  2. Are there specific flags or account attributes (e.g., delegated payment settings, invoice states) that could prevent the external payment from being accepted?

  3. Is there a recommended way to trace external payment posting inside Kill Bill (specific logs or plugins) to verify whether the request is being received?

  4. What is the best practice to reliably map renewal invoices to the correct account, especially in a setup with parent/child billing relationships?


 Additional Context

  • We are running Kill Bill 0.24.10 in Docker using the standard Kill Bill image.

  • The backend interacts with Kill Bill via the Java client.

  • Invoice creation and subscription creation work as expected; the issue is isolated to invoice payment posting.


Any suggestions, debugging pointers, or similar experiences would be very helpful.
Thank you in advance for your guidance.

Regards,
Harish kukkala

karan bansal

unread,
Dec 15, 2025, 9:47:37 PM (6 days ago) Dec 15
to Kill Bill users mailing-list
Hi Harish,

There should be log entries present. I tried the below steps in my local environment as well. 

Created a child account 
Created a parent account  
Linked the child account to the parent and payment delegated to the parent 
Created a monthly subscription on the child ( 100 USD ). This created an invoice on the child account showing balance 0. This also created a draft summary invoice on the Parent account. 
Committed the Parent account invoice. This changed the balance for both Child and Parent invoices to USD 100. 
Created a default external payment method for the parent account. 
Api call to the endpoint that you shared using the parent invoice ID and parent account ID. This changes the balance of both the parent and child invoices to 0. 

I am attaching the curl request used as well as the logs generated. 

Regards
Karan
curl and logs
Reply all
Reply to author
Forward
0 new messages