#hammad-umar_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1266009680950329384
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- hammad-umar_api, 33 minutes ago, 19 messages
- hammad-umar_code, 3 hours ago, 19 messages
hi there!
I think the error message is pretty clear
you can check your Balance before trying to make a Transfer with this endpoint: https://docs.stripe.com/api/balance/balance_retrieve
How can i add balance in test account for testing payout ?
you should make a payment with one of these tests cards: https://docs.stripe.com/testing#available-balance
Can you provide me any code snippet for adding balance in my test account for testing payout ?
start with this: https://docs.stripe.com/api/payment_intents/create
then add payment_method: pm_card_bypassPending and confirm: true, and it should work.
after doing this can i make payout to other user bank accounts ?
no, you can only make a payout to your own bank account
unless you are using Stripe Connect
how can i create payout for other user bank accounts ?
what do you mean by "other user"? do you mean a Connected Account?
I am creating a service based application in which user can add their bank accounts and from admin side i release funds to their bank accounts that's my scenerio.
how can user add their bank accounts and how can i send money to their accounts please guide me and tell me the full flow
are you using Stripe Connect, are does your users have a Stripe account?
I am using stripe test account not yet stripe connect ? My users dont have stripe account yet.
the only way to send money to users is if you are using Stripe Connect, and the users have a Stripe account connected to your own account.
you can learn more about this here: https://docs.stripe.com/connect
Is my stripe account should be verified ? All steps completed ?
Please guide me step by step and share with me docs for doing that ... first of all creating my connect account then creating users stripe accounts then create payouts to their bank accounts
???
so you want to use Stripe Connect? the first steps is to decide which type of connected account you need: https://docs.stripe.com/connect/accounts
Ok, I think express account should be good for our scenerio.
Then what's the next step ?
๐ stepping in for soma as they need to step away
ok no problem
You would follow https://docs.stripe.com/connect/express-accounts to create and onboard an account in test mode. You want to use the data we provide here: https://docs.stripe.com/connect/testing to get that account verified when you onboard it
After that you can create Transfers to that account
Is my stripe connect account should be verified and all steps completed for testing this scenerio ?
Nope
You only need an enabled test-mode Connected Account
Your platform does not need any verification
and which API is used for payouts ?
Payouts or Transfers?
router.get("/testing-stripe", async (_, res) => {
try {
// Create a Stripe express account
const account = await stripe.accounts.create({
type: "express",
country: "US",
email: "hammadumar8080@gmail.com",
business_type: "individual",
individual: {
first_name: "Hammad",
last_name: "Umar",
},
capabilities: {
card_payments: { requested: true },
transfers: { requested: true },
},
});
// Create a bank account token
const token = await stripe.tokens.create({
bank_account: {
country: "US",
currency: "usd",
account_holder_name: "Hammad Umar",
account_holder_type: "individual",
routing_number: "110000000",
account_number: "000123456789",
},
});
// Attach the bank account token to the Custom account
const bankAccount = await stripe.accounts.createExternalAccount(
account.id,
{
external_account: token.id,
}
);
// Generate onborading link
const accountLink = await stripe.accountLinks.create({
account: account.id,
refresh_url: "http://localhost:5002/redirect",
return_url: "http://localhost:5002/redirect",
type: "account_onboarding",
});
// "bankAccountId": "ba_1PgQ17Q9iL3erqVymxQEwI47",
// "stripeAccountId": "acct_1PgQ13Q9iL3erqVy"
const payout = await stripe.payouts.create(
{
amount: 10000, // Amount in cents (e.g., $100)
currency: "usd",
destination: "ba_1PgQ17Q9iL3erqVymxQEwI47",
},
{
stripeAccount: "acct_1PgQ13Q9iL3erqVy",
}
);
return res.json({
payout,
});
} catch (error) {
console.error("Error creating bank token:", error);
return res.status(500).json({ message: error.message });
}
});
Payouts are when funds go from a Stripe Account to an external account (like a bank account)
that's my code
Transfers are when funds move from your Platform to a Connected Account
You don't need to collect the bank account here at all with Express
when i create payout i got this error
{
"message": "You have insufficient funds in your Stripe account for this transfer. Your card balance is too low. You can use the /v1/balance endpoint to view your Stripe balance (for more details, see stripe.com/docs/api#balance)."
}
All you need is to create the account and then create the Account Link and visit the URL that is in the response for the Account Link
Then fill in all of the information in Connect Onboarding at that link
got this error
{
"message": "You have insufficient funds in your Stripe account for this transfer. Your card balance is too low. You can use the /v1/balance endpoint to view your Stripe balance (for more details, see stripe.com/docs/api#balance)."
}
when i create payout
My colleague already explained that
You have to add funds to your balance using the Available balance card
can you refactor my code and send me Plz ?
where you write code ?
Not sure what you mean. The purpose of this discord server is to help unblock developers when they have questions about the Stripe API. We don't build your integration for you. If you need help writing code then you need to hire a developer