#milan_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1249778881184141395
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello! Reversing the Transfer as you mentioned is the approach we recommend. The relevant docs are here, and represent our best practices around refunds with destination charges: https://docs.stripe.com/connect/destination-charges?platform=web&ui=stripe-hosted#issue-refunds
Let me pull up some notes and get back to you in a minute or so
These are copy & paste notes from a Stripe support rep (it's well summarized so I can't shrink it much further).
Issuing refunds via Stripe dashboard (short term solution)
I confirmed with our product support team that issuing the refund from connect account to platform, then platform back to the customer is the best option in order to avoid pulling funds from the platform's balance. Here are the steps to issue the high priority refunds:
Refund py_1PLxQDQ3WUgB2Wac6TISs4uc and py_1PNPyuQ3WUgB2WaccNQeL4Tz
https://dashboard.stripe.com/acct_1PJlupQ3WUgB2Wac/payments/py_1PLxQDQ3WUgB2Wac6TISs4uc
https://dashboard.stripe.com/acct_1PJlupQ3WUgB2Wac/payments/py_1PNPyuQ3WUgB2WaccNQeL4Tz
Once the refund amounts hit the platform, refund pi_3PLwrvLXuND1HOuc1Fru2UEZ and pi_3PNOQ5LXuND1HOuc1hIyisWf
https://dashboard.stripe.com/payments/pi_3PLwrvLXuND1HOuc1Fru2UEZ
https://dashboard.stripe.com/payments/pi_3PNOQ5LXuND1HOuc1hIyisWf
Note: notice that the refunds from connect account to platform use a "py_" prefix, and the
The reason of the "insufficient funds" error for py_3PLwrvLXuND1HOuc1jmSvHvN
The payment is the transaction from customer to platform.
In order to use the connected accounts balance for such refunds, the platform needs to set reverse_transfer = true via API, or reverse the transfer first to have enough funds on the platform account.
We will follow up regarding reverse transfer capability via dashboard.
Follow up question for Studio Designer team: was this refund attempt via 3rd party (API) or via dashboard?
Confirming you have auto-debit enabled, which will debit the connect account in the event that the connect account balance doesn't have enough funds. More info on this here.
Also - we are using PaymentIntents. We set the Destination and OnBehalfOf during the payment (it's called destination charges, is that right?).
Yes, that's correct.
The documentation I linked above pertains to exactly the flow you're using.
What questions do you have at this point?
I'm scratching my head now. I've copied and pasted the refund call we make below. How do we avoid errors with insufficient funds?
var refundResponse = await refundService.CreateAsync(new RefundCreateOptions
{
Amount = Convert.ToInt32(amount * 100),
PaymentIntent = processorTransactionId,
RefundApplicationFee = false,
ReverseTransfer = true
});
Can you give me the request ID of a specific attempt to refund that failed because of insufficient funds? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_Gpn9UNN5pzgZ3t
When they say "Insufficient funds in your Stripe balance" are they referring to the platform or the connected account?
Your platform. Refunds for destination charges always use your platform's balance. If you don't have enough in your available balance to cover the refund it will fail like this. You are telling us to reverse the transfer, but that's a separate operation. Reversing the transfer doesn't cover the refund itself; your platform's available balance has to cover it.
Ah. So the reason for the errors is that the platform account doesn't have funds in Stripe so Stripe rejects it. So we either have to keep some float with Stripe to cover these or work with Stripe on a negative limit they will allow for the platform account?
Correct.
Ok. And extra confirming - there is no alternative flow we could or should be using for refunds?
Could? Sure, there are always alternatives. Should? That depends on your specific situation, needs, etc. and is up to you to determine. What's described above is our recommended approach, though.
Is there any approach where the refund flow only touches the connected account and never flows through the platform account?
Not for Custom accounts and destination charges, no.
Ok. Thank you.
One thing you might be interested in is debiting your connected accounts though: https://docs.stripe.com/connect/account-debits
You could debit the connected account, make sure that happened successfully, then refund using those funds and not reverse the transfer (since you already debited the amount; you don't want to then reverse it, resulting in a double-debit from the connected account).
This moves money from the connected account to the platform, right?
Yep.
Ok. I guess we'll stick to what we have. It doesn't seem like that changes the flow; it's more like it changes the timing at which the flow happens. But the refund operation as we have it now will -
- Debit the platform
- Refund the payer
- Move funds from the connected account to the platform
All of the above is managed by Stripe after our one API call.
Yep, that's why we recommend that flow, it's easiest, and it links everything together in a more logical way.
Ok. Thank you. Have a great day.