#alessandromontanari_webhooks

1 messages ยท Page 1 of 1 (latest)

thorn wraithBOT
#

๐Ÿ‘‹ 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.

sick river
#

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

wheat brookBOT
fallow notch
#

hello! can you share an example event id for the customer_cash_balance_transaction.created in production that i can take a look at?

sick river
#

Sure

fallow notch
#

can you paste the id here? i'll need to copy it and that's not possible from a screenshot

sick river
#

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)

fallow notch
#

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

sick river
#

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

fallow notch
#

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

sick river
#

(In test mode is possible with the request id, the same id reference to the same "flow")

#

oks, no problem

#

Thanks for the support

fallow notch
#

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.

#

oh wait @sick river

sick river
#

๐Ÿ‘€

fallow notch
#

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

sick river
#

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)

fallow notch
#

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

sick river
#

Correct

fallow notch
#

ah yeah, sorry then, it still goes back to you needing to track it on your own then ๐Ÿ˜“