#Teelu
1 messages · Page 1 of 1 (latest)
You're talking about Customer credit balances, right?
Correct!
So I think customer.updated is the only webhook event for this and it sounds like you're doing that correctly already. Not sure if you're also checking this customer_cash_balance_transaction.created but it might be helpful if you use cash balances:https://stripe.com/docs/api/events/types#event_types-customer_cash_balance_transaction.created
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hmm we do not. Okay, I guess the only way is through the customer, but even then, knowing which of the balance_transaction's caused that change is not trivial if the amounts are the same
I didn't think there was a corresponding Balance Transaction for Customer credit balance events. Do you have an example of one of these Balance Transactions I can look at?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I'm looking for the ID of a specific balance transaction that corresponds to the Customer credit balance
I see credit_note as a property on the Balance Transaction, but I don't have a specific object on my end I can look at to help troubleshoot
"id": "cbtxn_1MUF6IKjI0M1O6BOfxhY7Thv",
"object": "customer_balance_transaction",
"amount": -12000,
"created": 1689473460,
"credit_note": null,
"currency": "usd",
"customer": "****",
"description": "Adding this through the stripe UI",
"ending_balance": -12000,
"invoice": null,
"livemode": false,
"metadata": {},
"type": "adjustment"
},```
Is that the whole payload from the retrieve API call you made?
No, there is a list of multiple, but lets say theres more than one for the same amount of -12000, I dont see an easy way to determine the source. If the balance on a customer was changed, we get the customer.updated webhook event, and then from there, finding the reason for that exact change is not trivial
My assumption is that, in order to delineate 2 Balance Transactions for identical amounts on the same Customer, you would need to compare the timestamp, as I don't really see another way of knowing which Balance Transaction corresponds to which event
I definitely realize the complexity and instability of that approach though
Having a webhook for customer_balance_transaction.created and having those entities included would be a lifesaver
Yeah theres no real information from the customer.updated event other than "Heres your old and new balance"
I can submit a feature request for you. Do you have an account ID I can tie the request to?
even comparing the timestamp, i guess you can say whichever is closest to the customer.updated events created field but still not exact
would be nice to have a reference to the exact change modifying that balance
acct_1Ln2NYKjI0M1O6BO is the account id
For sure. I can see the use-case clearly and the current-state of what events are available for tracking this is not ideal. I'll submit the feature request for you and make sure the product team has a chance to look at it. I can't guarantee anything will come of it, but I'm happy to make sure the feedback is surfaced