#muhammad-hamza_api

1 messages ยท Page 1 of 1 (latest)

tawdry folioBOT
tidal notchBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

tawdry folioBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1253566219441672244

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

uncut plinth
forest radish
#

hello! Are you using instant payouts?

uncut plinth
#

yes using instant payouts

forest radish
uncut plinth
#

don't we need to write any code ?

forest radish
#

Platform pricing tools offer you a no-code solution

uncut plinth
#

this is okay now?

forest radish
#

Sorry, but we can't help with betas here on this channel

#

you'll need to reach out to https://support.stripe.com/contact/email

uncut plinth
#

can't find help in the support

forest radish
#

what do you mean?

uncut plinth
#

const payoutStripe = async (req, res) => {
try {
const { amount, currency, stripeAccount } = req.body;

    console.log(`Payout request: amount=${amount}, currency=${currency}, stripeAccount=${stripeAccount}`);

    const balance = await stripe.balance.retrieve({ stripeAccount });
    console.log(`Balance for account ${stripeAccount}:`, balance);

    if (balance.available[0].amount < amount * 100) {
        return res.status(400).json({ message: "Insufficient funds" });
    }

    const account = await stripe.accounts.retrieve(stripeAccount);
    console.log(`Account capabilities for ${stripeAccount}:`, account.capabilities);
    console.log(`Account requirements for ${stripeAccount}:`, account.requirements);

    const externalAccounts = await stripe.accounts.listExternalAccounts(
        stripeAccount,
        { object: 'bank_account' }
    );
    console.log(`External accounts for ${stripeAccount}:`, externalAccounts);

    if (externalAccounts.data.length === 0) {
        return res.status(400).json({ message: "No verified external bank account found" });
    }

    const payout = await stripe.payouts.create({
        amount: amount * 100,
        currency: "USD",
        method: "instant"
    }, {
        stripeAccount: stripeAccount
    });

    let response = { payoutId: payout.id, amount: payout.amount / 100, destination: payout?.destination, method: payout.method };
    return res.status(201).json({ message: "Payout created", response });

} catch (error) {
    console.error("Error:", error);
    return res.status(500).json({ message: "Internal server error", error: error.message });
}

}

error =>
{
"message": "Internal server error",
"error": "Cannot create payouts; please contact us via https://support.stripe.com/contact with details for assistance."
}

forest radish
uncut plinth
#

req_p98qzjjVTSID4C

#

req_FJ1yf0qnFuLdbv

forest radish
#

Like what the error message says you'll want to reach out to Stripe Support to understand why you can't create payouts

uncut plinth
#

you're also the stripe support please help me in this case

forest radish
#

We can't help with this specific issue you're encountering here on this channel. You must reach out to Stripe Support - https://support.stripe.com/contact, they'll be able to advise you on that

uncut plinth
#

can you let me know in simple words how can we charge the payout fees