#vrk18_api

1 messages ยท Page 1 of 1 (latest)

fringe relicBOT
#

๐Ÿ‘‹ 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.

jovial solstice
#

How can we achieve both cases using refund API

azure peak
#

๐Ÿ‘‹ happy to help

jovial solstice
#

Thanks

#

refund create options are {
"amount": "10000",
"payment_intent": "pi_3QuVlvHvbngkCFkt0lIJM496",
"reverse_transfer": "True"
}

azure peak
#

taking a look at your setup please give me a minute

jovial solstice
#

No problem Thanks

azure peak
#

the 1st case is easy

jovial solstice
#

What about the second case ?

azure peak
#

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

#

which is more complex because of its restrictions

jovial solstice
#

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

azure peak
#

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

jovial solstice
#

Okay, how much it reverses ??

azure peak
#

5000 to the customer

jovial solstice
#

I mean how much it reverses the transfer from connected account to platform account

azure peak
#

it doesn't

jovial solstice
#

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"
}

azure peak
#

no

#

you need to follow the steps I mention in my previous message

jovial solstice
#

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

azure peak
#

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

jovial solstice
#

{
"amount": "5000",
"Charge": "Ch_XXX",
"reverse_transfer": "True"
}
like this right ??

azure peak
#

it's not a reverse_transfer

#

oh sorry

#

you're right

#

I thought you were passing refund_application_fee

#

my bad

jovial solstice
# azure peak correct!

In this case how much it refunds end user and How much it transfer reverse to platform account ??

azure peak
#

it would refund the customer 5000. the connected account will keep the other 5000

jovial solstice
#

I don't think it is doing that way, can you check it

azure peak
jovial solstice
#

Can you check it's transfer "tr_3QuVlvHvbngkCFkt0z2UOQGg", and how much it was reversed, Why it reversed only 9806 ??

azure peak
#

because you didn't apply the refund_application_fee

jovial solstice
#

If I put refund_application_fee: true, will it reverse 10000 back to platform account ??

azure peak
#

no wait... I'm lost now...

#

give me a second

jovial solstice
#

No problem

azure peak
#

oh ok

#

so the customer isn't paying 10000

#

they're paying 10198

fringe relicBOT
azure peak
#

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

jovial solstice
#

So If I take off amount from options, it is good right? it reverses 10000 to platform and refund 10000 to customer right ?

azure peak
#

it would refund 10198 to the customer

jovial solstice
#

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

patent summit
#

Hi. I'm taking over from my colleague. Please, give me a moment to catch up.

jovial solstice
#

No problem

patent summit
jovial solstice
#

I need to create the refund without reverse_transfer and if the refund is success, need to create the transfer reversal right ??

patent summit
#

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?

jovial solstice
#

Thanks for your help

#

If I do Transfer Reversal first, do the funds available immediately for the refund??

patent summit
#

They should be, yes.

jovial solstice
#

Alright then Thanks so much for your help