#alessandromontanari_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1219917172864712724
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi!
If a user has multiple pending payments of this type and sends a bank transfer that is either too high or without a reason, the Stripe system redistributes the amount among the open payments, with the remainder going into the cash balance. I simulated this behavior on staging using the appropriate tool (simulate cash balance). This generates events on the webhook customer_cash_balance_transaction.created and payment_intent.*. In the test environment, these events are traceable to the same bank transfer via its "request id", but in the production environment, this section is null. For billing purposes, I need to know how these transactions are linked
hello! can you share an example event id for the customer_cash_balance_transaction.created in production that i can take a look at?
can you paste the id here? i'll need to copy it and that's not possible from a screenshot
PAYLOAD
{
"object": {
"id": "ccsbtxn_1OuX3NFTgZEmRcC45hKFqOFx",
"type": "applied_to_payment",
"object": "customer_cash_balance_transaction",
"created": 1710494873,
"currency": "eur",
"customer": "cus_PgHuvyf8JzGg9k",
"livemode": true,
"net_amount": -1500,
"ending_balance": 200,
"applied_to_payment": {
"payment_intent": "pi_3OuAhDFTgZEmRcC40boiCsv4"
}
}
}
REQUEST
{
"id": null,
"idempotency_key": null
}
And this is the fund event
evt_id: evt_1OuX3PFTgZEmRcC4lnXJfLTk
{
"object": {
"id": "ccsbtxn_1OuX3MFTgZEmRcC4LdJUKRnl",
"type": "funded",
"funded": {
"bank_transfer": {
"type": "eu_bank_transfer",
"reference": "",
"eu_bank_transfer": {
"bic": "",
"iban_last4": "",
"sender_name": ""
}
}
},
"object": "customer_cash_balance_transaction",
"created": 1710494872,
"currency": "eur",
"customer": "cus_PgHuvyf8JzGg9k",
"livemode": true,
"net_amount": 1700,
"ending_balance": 1700
}
}
Request: {"id": null, "idempotency_key": null}
(I miss the event id in the first payload, sry: evt_1OuX3NFTgZEmRcC46UdautUd)
This isn't going to be possible unfortunately. Such a feature or linkage just doesn't exist currently
The way this works is that the customer cash balance is like a bucket, the bank transfers that the customer makes goes into that bucket, reconciliation can be done by taking an amount from the bucket. So a PaymentIntent for example, can actually reconcile funds from bank transfer #1, and bank transfer #2
This is ok. If a payment intent retrieve multiple times the funds from the cash balance "bucket" is not a problem. But I want to know for a specific bank transfer, where this amount is gone
i understand, but there's no way to currently do so. you could theoretically maintain your own mapping. unfortunately, it's not something that Stripe has a list or report for right now
(In test mode is possible with the request id, the same id reference to the same "flow")
oks, no problem
Thanks for the support
sorry that i don't have a better solution. You can consider writing in via https://support.stripe.com/contact/email to share feedback with our product team to consider your use case for future development.
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
oh wait @sick river
๐
sorry, i was referring to the wrong object previously. This is actually the Stripe object we should refer to : https://docs.stripe.com/api/cash_balance_transactions/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It mentions what the funds were used for : https://docs.stripe.com/api/cash_balance_transactions/object#customer_cash_balance_transaction_object-applied_to_payment-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if you want to match or identify the original bank transfer that it came from : https://docs.stripe.com/api/cash_balance_transactions/object#customer_cash_balance_transaction_object-funded-bank_transfer-reference - the bank transfer reference could be used, assuming that the customer used a unique reference each time they transferred
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 received 2 different webhook event of type customer_cash_balance_transaction.created
one is used to specify the fund event (the bank transfer received) and one for the amount applied from the cash balance to the payment intent
(The example payloads are in the top of these messages)
yep, i guess you only see the funded details if it's type: "funded"
so i guess you would still need to perform some mapping of your own
Correct
ah yeah, sorry then, it still goes back to you needing to track it on your own then ๐