#Anjali-transfers
1 messages · Page 1 of 1 (latest)
Hi there! When you say "platform amount" what do you mean exactly?
Are you taking an Application fee?
Or are you looking to view the original charge?
yes
I am creating separate charge and transfer for my account. Once the payment made a portion goes to our platform and rest goes to connceted account
I checked at back end, I can see the transfer amount to connected account from transfer section.
platform fee is like (customer amount-(stripe fee + transfer amount)
Are you setting a source_transaction?
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $customer_amount,
'currency' => 'cad',
]);
$transfer = \Stripe\Transfer::create([
'amount' => $transfer_amount,
'currency' => 'cad',
'destination' => 'acct_1KrMxdPFuBAwSNy4',
]);
this is my transfer code
'Amount' in payment intent is the customer amount. 'Amount' in transfer create is the amount to be transfererd to connect acocunt
Got it. So currently you aren't tying these transfers to the original charge at all.
You want to either use a transfer_group or a source_transaction. Give https://stripe.com/docs/connect/charges-transfers a read if you haven't yet.
As that explains both of those
Sure, it is a way that you can link PaymentIntents and Transfers together. So you set an arbitrary string when you create the PaymentIntent (https://stripe.com/docs/api/payment_intents/create#create_payment_intent-transfer_group) and then set that same arbitrary string when you create the transfer (https://stripe.com/docs/api/transfers/create#create_transfer-transfer_group). This allows you to tie those two objects together.
It sounds like exactly what you want.
collected fee? then another code contains application_fee_amount. shoild i need to write application_fee_amount in case of transfer?
No you don't need to use an Application fee unless you want to. Application fees are really for if you create the Payment directly on the Connected Account and want to take a small fee for facilitating the payment.
With Separate Charges & Transfers you can just not transfer the full amount of the charge in order to take your fee.
Can you make it more clear
Not really lol. Can you tell me what is confusing you?
separate charges and transfers, no need to write application_fee_amount, right?
Correct
You should just add a transfer_group
That's all you really need to do to be able to see which charge is associated with the transfer
oh ok
transfer_group is an identifier?
what should i given as a value to transfer_group?
Whatever arbitrary string you want
You just want to use the same string for transfer_group on your PaymentIntent and on your Transfer
That is how they are then linked together
The other option, as mentioned above, is just to set the source_transaction on the transfer
Setting the source_transaction does help with your Transfer availability (see: https://stripe.com/docs/connect/charges-transfers#transfer-availability)
So if you want to always transfer funds shortly after the charge, then you might want to set a source_transaction instead. You can also set both if you want.
No. If you don't take an application fee then there is no set aside "collected fee". As you stated previously... your fee is the charge amount - stripe fees - transfer amount.
ok. That amount automatically added to the balance, right?
Just i need to see where that amount gets reflected
am chechking the flow
checking
Yep it will automatically go to your balance!
ah ok
I think my code is working.
One more what will be the value for source_transaction. It is like{charge_id})
from where i can get the id?
The PaymentIntent will have a charges property: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-charges. You access the charge ID from paymentintent.charges.data[0].id
The successful charge will always be the most recent charge, so the first one in the list
ok, thanks
Sure!