#asadghafoor_14146
1 messages · Page 1 of 1 (latest)
you are setting destinationAccountId to a Charge object
that should be a Connected Account Id
acct_xxx
i do this but the res is not valid its 500 error that destination is not valid
thats a rsponse
{
"status": 500,
"message": "No such destination: 'acct_1Nk3lOKVkVLltNHk'"
}
On which account are you calling this API?
Is acct_1Nk3lOKVkVLltNHk your Connected Account?
You can't transfer between 2 random accounts. The destination needed to be a Connected Account of the Account whose you are sending API
can you provide me in python
i am using express accont i want to handle this scenario for express accoun
no i a using node js and express js
okk
and the payout will credit in admin account after the 7 days can i reduce that days of payouts
no its not a problem i want to transfer money from one express accont to other expressa ccount using node js api's
app.post('/amount_transfer', async (req, res) => {
try {
const sourceTransactionId = 'ch_3O3ZEpGBlhCZzydA1ZOH4ON4';
const destinationAccountId = 'acct_1Nk3lOKVkVLltNHk';
const amount = 1600;
stripe.transfers.create({
amount,
currency: 'usd',
source_transaction: sourceTransactionId, // Use source_transaction
destination: destinationAccountId,
}, function (err, transfer) {
if (err) {
console.error(err);
res.status(500).json({ status: 500, message: err.message });
} else {
console.log(transfer);
res.json({ status: 200, message: 'Transfer successful', transfer });
}
});
} catch (err) {
res.status(500).json({ status: 500, message: err.message });
}
});
that's my api
and the error is
{
"status": 500,
"message": "No such destination: 'acct_1Nk3lOKVkVLltNHk'"
}
why it's not posssible tell me the reasons pease
Stripe is not a platform to simplify moving funds between account. It needs to be part of a transaction, or payment from customer. We are not really for money transfering
what is the step for payout to other people accoutn and which api i use to tranfer the money to their account
i am developing a platform where a user can avail service and service provider can provide service. in the start of agreement between two, amount is transferred to my account from user account. which for now is working fine on my end. if agreement fails i am using refund API to return money back to cutomer, which also is working fine. now issue is if there is suceesfull agreemnent between two, i want to forward that amount after 10% discount to next service provider. how can i do this? using stripe account.
amount is transferred to my account from user account
How do you do this? Is your account a Platform account and your user account is Connected Account to you?
no not like this, sory i forgot to explain, user pay through card and i have integrated strip api for that and payment is done from card, which is coming to my account, its test mode account and i can see test payments done to my account from card, user is not paying from stripe to my stripe account but user is paying from card
So that's actually a Customer
Then it's good! Then later when
want to forward that amount after 10% discount to next service provider.
You want your service provider as a Connected Account, and you are the Platform, then you simply do a Transfer like you are doing above, but be sure to pass the correct Connected Account Id as the destination
can i add another test account as connect account in API? is it possible in test mode? if i have credentials sk_ , pk_ keys of other account, any way to add that as connected? yes i want to transfer a specific amount which i will calculate to a customer, i want to know the procedure, if i take details from cutomer on fromt end like gmail, etc, can i add that as connected to my tet account?
You can create as many Connected Accounts to your Platform as you want. But if you want to connect some already existing Account to your account then you will need to use OAuth for Standard Account
means i should give option in for example "user profile page" to each user to connect with stripe, once user has connected stripe account then it will be easy for me to transfer any amount to that user ? right?
If they haven't ever had a Stripe account yet, you can onboard them directly as Standard Connected Account to you https://stripe.com/docs/connect/standard-accounts
The OAuth flow above is for the case they already have account