#Suraj-Refund

1 messages · Page 1 of 1 (latest)

upper frost
#

Sure, how can we help?

jade arch
#

yes, i am using destination charge with transfer less amount (not using application fee attribute), suppose charge is 23$ and stripe take fee from platform 0.97$ and i have make less transfer take some "x" platform fee transfer $21.85.

#

i dont want to pay stripe fee or platfrom fee from my side as refund to customer

#

please check charge-id : pi_3JfeOeGOBPjZ1Bk21vLpghuV

#

??

upper frost
#

Hi, sorry I am in several workstream. Bear with me

#

okie looking at it now

#

You collected fee by transferdata[amount] not application_fee_amount

#

so the "refund_application_fee" parameter doesn't really matter

#

When you do the refund, Stripe will simply revert the fund portion specified (2088) from the total of 2185, I think

#

How was your balance goes after this? Did you keep the fee taken from 2185 to 2300?

jade arch
#

i have no idea

#

sending you code, wait

#

public Refund RefundPaymentByPaymentIntentWithoutApplicationFee(string paymentIntent)
{
var paymentObj = GetPaymentIntentByPaymentIntentId(paymentIntent);
var transferObj = GetTransferByPaymentIntentId(paymentIntent);
var balanceTransaction = GetBalanceTransactionById(paymentObj?.Charges?.Data[0]?.BalanceTransactionId);

        var refunds = new RefundService();
        var refundOptions = new RefundCreateOptions
        {
            PaymentIntent = paymentIntent,               
            ReverseTransfer = true,
            Amount= (long)(transferObj.Amount- balanceTransaction.Fee)
        };
        var refund = refunds.Create(refundOptions);
        return refund;
    }
#

i dont want to send stripe fee to customer from platfrom, i think given code is not working good for me ..?

#

please suggest

upper frost
#

Hmm I am not sure what is that balanceTransaction.Fee you are calculating, but you pass a custom amount to the Refund API, and Stripe just look at that value to process a refund

#

I also don't think stripe fee is refunded to the customer. It's kept by Stripe as a "processing fee"

#

I might be wrong. In the end please contact Support and they will explain about fee better than us here, which are mostly developers and integration experience

jade arch
#

please can you give idea how destination refund happen ..?? with example, i make me easy to grab it

upper frost
jade arch
#

yes i am using this method, but stripe take fee from charge, when goes from refund to cover full amount it take that stripe fee amount from platfrom and refund back to client ..?

upper frost
#

It is propotion

#

Let simulate this situation: you specified 23$ for the full amount, 21.85 to give the connected account, keep 1.15 for yourself, right? inside that 1.15 there will be Stripe fee. Now you refund 20.88$ to the customer

#

It will refund 19.84$ from the connected account, as (19.84/20.88 = 5% = 1.15/23), and 1.04$ from your Platform account

#

So it is sort of "fair", as Stripe calculate the propotion from the amount refund to the original amount (20.88$ vs 23$), and take corresponding parts from the connect account and your account (including your fee and Stripe fee)

#

Does this explanation make sense? I am afraid that's it and there's no way to tweak

#

TLDR; you get the same portion as the connected account, and the customer

jade arch
#

total = $23
stripe fee= $0.97
platform charge =1.15
Rest : $ 20.88 is transfer to connect account,

  1. I want to give $20.88 amount to client as refund, not returning any kind of charge (platform charge, stripe etc from their side), what thing i need to do here in code ...??
  2. If i want to give refund to client platform fee(means $22.03) or service fee(means $21.85) or both(means$23) , what i need to do in code..?
#

Code That i am using is..

#

var refunds = new RefundService();
var refundOptions = new RefundCreateOptions
{
PaymentIntent = paymentIntent,
ReverseTransfer = true,
Amount= (long)(transferObj.Amount- balanceTransaction.Fee)
};
var refund = refunds.Create(refundOptions);
return refund;

upper frost
#

I think you misunderstood

#

In first request, you create a Destination Transfer of 23.00$ and transfer an amount of 21.85$ to the connected account, and take 1.15$

#

Then 21.85$ is the exact amount that your Connected acounte received, not 20.88

#

the Stripe fee 0.97$ was deducted from your 1.15$ of Platform fee

#

23.00 = (0.18 + 0.97) + 21.85

#

Is it clear until here?

jade arch
#
  1. I want to give $21.85 amount to client as refund, not returning any kind of charge (platform charge, stripe etc from their side), what thing i need to do here in code ...??
  2. If i want to give refund to client platform fee(means $22.03) or service fee(means $21.85) or both(means$23) , what i need to do in code..?
#

my code is

#

For points-1 :

var refunds = new RefundService();
var refundOptions = new RefundCreateOptions
{
PaymentIntent = paymentIntent,

        };
        var refund = refunds.Create(refundOptions);
        return refund;
#

is it ok for point 1 , customer get $21.85 no other money taken from platfrom ..??

upper frost
#

No I don't think it's possible, I am explaining, bear with me

#

For 1: No you can't All stakeholder participated in a Charge to your customer (you, the connected account, stripe) take the same proportion. The customer is charged $23.00, which breaks into (21.85 + 0.18 + 0.97). If you refund them $21.85 it will breaks again into (95% of $21.85 from connected account, 5% of $21.85 from your taken fee + Stripe fee)

#

Onething I concern is about Stripe fee, if it's refunded as well, or not, finding the answer

jade arch
#

is there any way i can refund only transfered amount ($21.85) not something else to customer ..?

upper frost
#

No, I don't think so

jade arch
#

because,if i refund the whole charge, it take rest 1.15 $ from platform to cover full amount, right...?

#

what if create refund like that:

var refunds = new RefundService();
var refundOptions = new RefundCreateOptions
{
PaymentIntent = paymentIntent,
ReverseTransfer = true,
};
var refund = refunds.Create(refundOptions);
return refund;

#

how much client get and platform pay for that

upper frost
#

it will be the full amount, and yes it take rest 1.15 from platform to cover full amount

#

I know what you mean, you want only the part to connected refunded but keep Platform part

#

But it is really ... not possible

#

Let me try myself for one last time, and see if I can figure it out somehow

jade arch
#

yes, i think this is possible through application_fee attribute, right..?

upper frost
#

For application_fee, yes, you can sort of do that

#

if you refund the full $23.00, and set refund_application_fee = False, then you will keep the part you took

#

but I think Stripe fee still be taken by Stripe

jade arch
#

got it,thanks

upper frost
#

It was a long convo.. Hope it helped!

#

I need to run for today. Feel free to come back open another thread if you have other questions!