Attaching a new payment method to an existing subscription.

38 views
Skip to first unread message

VijaySoftware cochin

unread,
May 11, 2025, 10:09:12 AM5/11/25
to Kill Bill users mailing-list
I have created a subscription sucessfully  using stripe plugin and the payment method is added.But when i try to update the payment method to the subscription  with a  new card  it fails with the error 
  • PLUGIN_FAILURE  
  • message: Payment didn't happen - Cancelled by Janitor
  • overriddenTransactionStatus: CANCELED
  • request_id: req_PGjwLvvkl3AqjQ
  • status_code: 400
  • stripe_error_message: A source must be attached to a customer to be used as a `payment_method.Please let me know what this error implies.

karan bansal

unread,
May 15, 2025, 1:24:29 PM5/15/25
to Kill Bill users mailing-list
Hi Vijay,

This should mean that the card is not linked to the customer account in stripe. Could you please provide more detailed steps like how are you updating the card.

Regards
Karan

VijaySoftware cochin

unread,
May 28, 2025, 8:12:05 AM5/28/25
to Kill Bill users mailing-list
Hi,

We are using Kill Bill with Laravel and the Stripe plugin. The steps I took are as follows:

  1. Canceled the existing subscription and resubscribed using a new card (the card is dynamically generated using a Stripe token, in the same way as we handled it during card expiry) .

  2. Retrieved the existing Kill Bill account ID, added a new payment method via the API, and set it as the default.

  3. These are the same steps that were followed when a new account was initially created in Kill Bill—at that time, the subscription was created and the payment was processed automatically via Stripe.

  4. However, during this second attempt, although the invoice was successfully generated and the new payment method was added and set as default in Kill Bill, no changes appeared in the Stripe dashboard — neither in the transaction history nor in the payment methods. When checking the Stripe dashboard, only the error section showed the following issue:

    invalid_request_error – A source must be attached to a customer to be used as a payment_method.

      Here is the payment attempt payload:  
    {
    "amount": "4712",
    "capture_method": "automatic",
    "confirm": "true",
    "confirmation_method": "automatic",
    "currency": "USD",
    "customer": "cus_SDwwBg6vbRHqcC",
    "description": "Kill Bill charge",
    "metadata": {
    "kbAccountId": "494b6877-0563-4727-a23e-0dcef8669062",
    "kbPaymentId": "7d7b4341-41f3-460b-80d5-e53af938e791",
    "kbPaymentMethodId": "a701c436-c00f-4be0-93a7-72ed443504cd",
    "kbTransactionId": "5be151c4-589f-4034-9e1e-75690f6a3491"
    },
    "payment_method": "card_1RRRnkIst0P29sQhbP1iHeYe",
    "payment_method_types": {
    "0": "card",
    "1": "ach_debit"
    },
    "statement_descriptor_suffix": "Kill Bill charge"
    }
  Let me know if you'd like help fixing this Stripe error or reviewing how the payment method is being attached to the customer.
Reply all
Reply to author
Forward
0 new messages