#vmehtawhq_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/1270265460083920907
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- vmehtawhq_api, 3 days ago, 18 messages
- vmehtawhq_api, 5 days ago, 70 messages
- vmehtawhq_api, 6 days ago, 16 messages
You don't need to poll, instead you should listen to financial_connections.account.refreshed_balance events https://docs.stripe.com/financial-connections/balances#wait-for-the-balance-refresh-to-complete
That was my first approach but as the object doesn't have metadata, I can really use it in my existing flow.
We have running workflows with some uuid and we pass that workflow id in metadata and when webhook is received, we identify for which workflow that webhook belongs to. So, in this case there is no metadata so, can't really use it
Where do you set the metadata to?
One of them is payment intents, payment methods
For FCA, there's no place to set it to
You can set the metadata on the assocaited customer object, and retrieve it from financial connection account object through https://docs.stripe.com/api/financial_connections/accounts/object?lang=node#financial_connections_account_object-account_holder-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Right I can do it but it seems like, as the customer object can be created once per customer and can have one metadata, similarly is FCA.
I believe I didn't specify it but I would like to pass in different metadata with every payment that starts. Thinking more about it, it doesn't seem like we can do it.
So, I am aligning more towards polling the FCA instead of making it more complex or maybe I can store the FCA data some where in our db
What are your thoughts on this?
Can you tell me more about your integration? especially on the metadata
We have our workflows running and we run those for each payment and to get a webhook event successfully reach to workflow we need workflow id.
So, we put in workflow id in metadata whenever possible.
For each ACH payment we would need to check the balance for an account, and to check that we would like to put metadata (workflowID) in the refresh request object. (which is currently not possible and also makes sense because it is on level and not payment level)
Does this makes sense?
But do you really need to tie the FCA with a workflow?
I mean, if we want to check the balance for the account every time a payment comes in, yes, we might have to tie it in the workflow.
Any other approach/suggestion do you have?
No I don't see a good way to associate a FCA with a payment, and I don't think you should do that either. For example, let's say the customer has a balance of 100 in their bank account, and you want to charge them $40 and $70 respectively.
Your system create two workflows to refresh the balances, and you receive two FCA refreshed_balance events, both told you that the customer has $100, sufficient for both payments,
The first payment will be successful. However the second payment will fail in this because the customer has insufficient balance.
Yeah, I get what you're trying to say, there can be a dirty read
Even with the webhooks, I still believe there can be dirty read when two transactions are going on in parallel and can only be resolved at bank level only.
You may want to implement a queue to process payments sequentially to ensure sufficient balance is available.
Yeah, thanks Jack that was helpful
Happy to help!
Another thing that just came in my mind, checking balance would allow us to cancel the payment which asks more amount than the currently present in the account right now. Example, account has $50 and the ask is for $100 that would be rejected straight by our app due to insufficient funds.
Secondly, for dirty read, the worst scenario will be we send the payment to bank to be processed which will be ultimately rejected due to insufficient funds.
So, things should be just fine at the end.
I'd like to remind that there's failure fee for ACH debit https://docs.stripe.com/payments/ach-debit#ach-transaction-failures
Just an FYI, we have been using ACH for long time and we are now integrating FCA to check balances for the accounts, so ultimately errors due to insufficient funds should decrease.
Also, from docs it seems like the failure fee is only applied when there's a dispute(after the payment intent has moved to succeeded state) right?
No. Failure fee occurs when a ACH debit payment failed due to
- Insufficient funds
- An invalid account number
- A customer disabling debits from their bank account
Okay.
Back to my original question then, what's the avg time a FCA webhook takes for a balance refresh? If possible I would also like to know what has been the min max time observed till now. Is this possible for you to share because this will help us create the flow or user some kind of message
I don't have any public information about the average balance refresh time, and my recommendation is to listen to webhook events instead of polling.
Cool, thanks.