#xxxxx
1 messages · Page 1 of 1 (latest)
As this parameter is optional if i write transfer_data: {
destination: sellerUser.user.account_id,
},
the amount is transferred to the seller stripe account
Hi there. If you didn't specify transfer_data.destination, then this is just a normal charge in which the funds will be transferred to your account
and if i do not mention this then.
my main account right?
to my main stripe account not the user stripe account created
Right?
Yes you are right
i am building a project where if the seller has a stripe account then the money will be transferred to the seller stripe account otherwise to the main stripe account.
then what should be after the colon?
transfer_data: {
destination: sellerUser.user.account_id? sellerUser.user.account_id:____________________ ,
},
I am using the ternary operator for this situation.
You shouldn't specify a transfer_data in the request if you don't want to create a destination charge.