#milan_best-practices

1 messages ¡ Page 1 of 1 (latest)

wanton fossilBOT
#

👋 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.

gaunt hornet
sacred sequoia
#

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?).

gaunt hornet
#

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?

sacred sequoia
#

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
});

gaunt hornet
sacred sequoia
#

req_Gpn9UNN5pzgZ3t

#

When they say "Insufficient funds in your Stripe balance" are they referring to the platform or the connected account?

gaunt hornet
#

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.

sacred sequoia
#

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?

gaunt hornet
#

Correct.

sacred sequoia
#

Ok. And extra confirming - there is no alternative flow we could or should be using for refunds?

gaunt hornet
#

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.

sacred sequoia
#

Is there any approach where the refund flow only touches the connected account and never flows through the platform account?

gaunt hornet
#

Not for Custom accounts and destination charges, no.

sacred sequoia
#

Ok. Thank you.

gaunt hornet
#

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).

sacred sequoia
#

This moves money from the connected account to the platform, right?

gaunt hornet
#

Yep.

sacred sequoia
#

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 -

  1. Debit the platform
  2. Refund the payer
  3. Move funds from the connected account to the platform

All of the above is managed by Stripe after our one API call.

gaunt hornet
#

Yep, that's why we recommend that flow, it's easiest, and it links everything together in a more logical way.

sacred sequoia
#

Ok. Thank you. Have a great day.