#vrk18_api
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/1343873938685563002
๐ 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.
- vrk18_unexpected, 27 minutes ago, 17 messages
How can we achieve both cases using refund API
๐ happy to help
Thanks
refund create options are {
"amount": "10000",
"payment_intent": "pi_3QuVlvHvbngkCFkt0lIJM496",
"reverse_transfer": "True"
}
taking a look at your setup please give me a minute
No problem Thanks
the 1st case is easy
the it's the simple refund https://docs.stripe.com/connect/destination-charges?platform=web&ui=elements#issue-refunds
What about the second case ?
you would have to do a partial refund
like the first case
for the first 5000
but for the other part it's more complicated
you either need to keep a tab for the connected account and transfer less on the next transaction
or you need to create Account Debits https://docs.stripe.com/connect/account-debits
which is more complex because of its restrictions
For the first 5000, if I put {
"amount": "5000",
"payment_intent": "pi_3QuVlvHvbngkCFkt0lIJM496",
"reverse_transfer": "True"
}
How much it will refund the end user and how much it will reverse from connected account to platform account ??
you need to pass the charge not the payment intent
How much it will refund the end user and how much it will reverse from connected account to platform account ??
this would only refund the 5000 to the customer
Okay, how much it reverses ??
5000 to the customer
I mean how much it reverses the transfer from connected account to platform account
it doesn't
you either need to keep a tab for the connected account and transfer less on the next transaction
or you need to create Account Debits https://docs.stripe.com/connect/account-debits
which is more complex because of its restrictions
https://docs.stripe.com/connect/account-debits#requirements
If an end user makes a payment of 10,198 cents, we do a 10,000-cent destination transfer to the connected account. In cases where a refund is required, we need to:
Case 1: Refund 5,000 cents to the end user. And, reverse the 5,000-cent transfer from the connected account back to the platform account.
Can I achieve this case without any complexity??
Refund options are {
"amount": "5000",
"Charge": "pi_3QuVlvHvbngkCFkt0lIJM496",
"reverse_transfer": "True"
}
I am sorry, I don't get those were just transfer from connected account to platform account. But How can I refund the end user ??
you create a refund
as you did in the first case
the only difference is that you need to pass the amount
the charge ID is ch_xxx which is basically the PaymentIntent's latest_charge property
{
"amount": "5000",
"Charge": "Ch_XXX",
"reverse_transfer": "True"
}
like this right ??
it's not a reverse_transfer
did you look at this https://docs.stripe.com/connect/destination-charges?platform=web&ui=elements#issue-refunds
oh sorry
you're right
I thought you were passing refund_application_fee
my bad
correct!
In this case how much it refunds end user and How much it transfer reverse to platform account ??
it would refund the customer 5000. the connected account will keep the other 5000
I don't think it is doing that way, can you check it
for this request for example https://dashboard.stripe.com/test/logs/req_ofQX4xk2jp60kq you refunded 10000 for the customer
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Can you check it's transfer "tr_3QuVlvHvbngkCFkt0z2UOQGg", and how much it was reversed, Why it reversed only 9806 ??
because you didn't apply the refund_application_fee
If I put refund_application_fee: true, will it reverse 10000 back to platform account ??
No problem
which means when you're just refunding 10000 to the customer this is considered a partial refund
and the amount deducted from the connected account is calculated based on the prorated value of the partial refund
so 10000 * 10000/10198 = 9806
So If I take off amount from options, it is good right? it reverses 10000 to platform and refund 10000 to customer right ?
it would refund 10198 to the customer
So I can't achieve my requirement using refund API with transfer_reverse true right??
Either customer get more than what I refund or platform get less amount what I transfer reverse
Hi. I'm taking over from my colleague. Please, give me a moment to catch up.
No problem
I guess you could achieve this by manually creating a Transfer Reversal and a Refund without reverse_transfer
https://docs.stripe.com/api/transfer_reversals/create
I need to create the refund without reverse_transfer and if the refund is success, need to create the transfer reversal right ??
I guess, it's best to create a Transfer Reversal first, so your Platform has the funds to create a Refund. Why would a Refund fail?
Thanks for your help
If I do Transfer Reversal first, do the funds available immediately for the refund??
They should be, yes.
Alright then Thanks so much for your help