#albert_partial-refund-transfer-amount

1 messages ยท Page 1 of 1 (latest)

versed jewelBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

agile atlas
#

Hi ๐Ÿ‘‹

Can you tell me exactly how you are creating the Payment Intents and Refunds for this terminal integration?

worldly oracle
#

I can give you some logs from the tests

#

๐Ÿ‘‹

agile atlas
#

No sorry I don't need logs

#

I want to see the exact code you are using and an example Payment Intent ID and Refund ID

worldly oracle
#

For example this payment intent id pi_3TBZvCJSYYECYQ4l1bQW3O5o and refund re_3TBZvCJSYYECYQ4l1ieNIuRL

agile atlas
#

Great, thanks

worldly oracle
#

Maybe one special thing we add is the transfer_data.amount to the payment intent

#

With this we ended up needing an extra transfer for the tip amount when there is one

agile atlas
#

Okay but the issue you are concerned with is that the tip amount should not be refunded, correct?

#

In my account I see a partial refund for the correct amount. In the connected account I see a partial refund less than the expected amount

Can you explain this a bit more?

worldly oracle
#

yes, in this details the amount are correct, but when seeing the transaction from the connected account point of view the amount look off

#

This would be the id py_1TBZvJR6oRQFjvHkEqAZ0wHT

agile atlas
#

Please be more specific. what does "looks off" mean? Is the amount incorrect?

worldly oracle
#

I see 11.33 refunded in that view which leaves a net amount of 2.16, but it should be 0

agile atlas
#

This is the payment to the Connected Account as a result of this request

worldly oracle
#

Yes exactly

agile atlas
#

AH, gotcha okay so the payment is for 13.49 but the refund is for 11.33

worldly oracle
#

Yes I would expect a refund of 13,49

#

Since we emit a separate transfer for the tip amount, it should be ok to refund the full amount

#

This is the additional transfer in this case py_1TBZvLR6oRQFjvHkOxR6Q8g3

#

Or with group_pi_3TBZvCJSYYECYQ4l1bQW3O5o

agile atlas
#

I think this is expected because when you generate a partial refund we apply the same partial math to the amount returned from the Connected Account.

#

The math works out. 1466/1746 is 0.83 and 0.83 * 1348 is 1133

worldly oracle
#

I would not expect it to be calculated that way

agile atlas
#

Let me see if I can find some docs on this

#

Okay we call this out clearly in our doc on issuing refunds for Destination Charges here

If the refund results in the entire charge being refunded, the entire transfer is reversed. Otherwise, a proportional amount of the transfer is reversed.

worldly oracle
#

ok, that amount is not emmited in any event, right? Because the refund.updated and charge.refund.updated have amount 14,66 for this case

agile atlas
#

Because the total amount refunded is the amount you specify. But we take 0.83 of both the amount the platform kept and the amount the Connected account received. The Customer sees the full amount returned and the loss of funds is spread across bot the Platform and Connected Account

#

Where you would see this lower amount would be in the Transfer Refund object: trr_1TBZvYJSYYECYQ4leKemvX3L

Unfortunately I don't think we emit a webhook event for that

worldly oracle
#

I will check that

agile atlas
#

Oh, actually you should be able to see the lower amount in the transfer.reversed event

worldly oracle
#

I need to leave now. Thank you for the support, I will discuss the options with my team too, ask again if we have doubts

agile atlas
#

Sure thing! Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚

worldly oracle
#

Will check that event too!