#myz123
1 messages · Page 1 of 1 (latest)
Your system may initiate a refund request: https://stripe.com/docs/refunds#refund-requests
@pastel quartz I mean, for example, my application allows users to deposit some money in their account balance. What should I do if a user deposit and then request a refund? I need to update this user's account balance.
Which account balance are you referring to? Are you referring to the balance in a connected account or the balance maintained in your own system?
This should be managed in your system.
- When the customer placed the deposit, it will create a payment with Stripe.
- When the customer request a refund, then the refund request will be initiated on the payment in Step 1
The balance should be maintained in your own database.
I mean it doesn't apply a refund or withdraw from my side, users apply refund from bank side.
@pastel quartz For example, a user makes a success payment, then request a refund from bank side. After that, this user can withdraw his account balance because I don't his payment was canceled.
Are you referring to ACH direct debit? If so, then charge.dispute.* related events will be sent if the customer request refund from the bank: https://stripe.com/docs/payments/ach-debit#disputed-payments
You can then use the events to update the balance.
No, I mean sometimes people use stolen bank cards to pay.
It will follow the dispute process as well. You can find more information here: https://stripe.com/docs/disputes
@pastel quartz Hello river, sorry for the late reply. Can I listen to charge.dispute.created or charge.refunded event? How can I get related user id from these event?
Hi @sacred ginkgo I'm taking over the thread
Are you asking if you can get customer ID from a charge.dispute.created event?
user id from my app, I want to delete the transaction record and update the account balance.
Is this an ID you set by yourself? or an ID from Stripe?
Did you attach the ID to charge or PaymentIntent object as a metadata?
I have developed a small-scale financing platform that allows individuals to deposit money into their own accounts, with payments being processed through Stripe. However, a problem that's currently troubling me is that people may use stolen bank cards to make transactions, and then these transfers get cancelled by the banks. At the moment, my application credits the user's account with the corresponding amount as soon as the Stripe payment is confirmed successful. Moreover, I allow users to withdraw their money. But, if a user uses a stolen credit card and the payment succeeds, the transfer gets reversed but I do not receive any information. This results in the user's balance not being updated on my platform, and the user is still able to withdraw the money. How should I handle this issue?
Yes, I attech the userid and amount as meta data in stripe payment
Ok, then you can get the metadata that you attach to the PaymentIntent object from dispute->charge->payment_intent->metadata
I only pass metadata to stripe payment, how can get metadata from refund?
Depend how you create the refund, you can get charge or payment_intent from a refund object as well
I mean I only pass metadata in payment event, how can I get metadata from refund event?
Is there an ID of event that I can take a look?
I didn't create refund, I listen to charge.refunded event from webhook
@mild shadow Hello, how can get payment's metadata from charge.refunded event?
The charge.refunded event contains a charge object, so you can get the metadata from charge->payment_intent->metadata, if the metadata as set on the payment_intent object.
@mild shadow sorry the late reply. I didn't see your message. How can manually trigger a charge.refunded event to test if it works?