#sebastian_api
1 messages · Page 1 of 1 (latest)
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.
- sebastian_api, 3 hours ago, 29 messages
- sebastian_api, 5 hours ago, 96 messages
👋 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/1270188574490497035
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Do I message here? @gilded meteor
What is your question?
it needs photo ID otherwise itll stop payouts.
Yes. Onboarding should be completed in order to receive payouts
Ok so I want to know where the exact demo script is. Ill show you what I am using to upload the photo ID but I feel like its not the right script.
import { NextApiRequest, NextApiResponse } from 'next';
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
export default async (req: NextApiRequest, res: NextApiResponse) => {
// if (req.method !== 'POST') {
// return res.status(405).send({ message: 'Only POST requests are allowed' });
// }
try {
const fs = require('fs');
const file = await stripe.files.create({
purpose: 'identity_document',
file: {
data: fs.readFileSync('C:/Users/sebas/Code/trigopolis-web/public/passport_photo.jpg'),
name: 'passport_photo.jpg',
type: 'application/octet-stream',
},
}, {
stripeAccount: 'acct_1PkYKDIgtd4f6uLz',
});
res.status(200).json({ file });
} catch (error) {
res.status(400).json({ error: error });
}
};
What type of connected account are you using? Do you use Account Links to complete the onboarding or collect your own information and submit it through API?
What was the error you received when you uploaded the file? Could you share the request ID of the stripe.files.create()? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
No error haha
{
"file": {
"id": "file_1Pkan4Igtd4f6uLzRL1wWM3i",
"object": "file",
"created": 1722902294,
"expires_at": null,
"filename": "passport_photo.jpg",
"links": {
"object": "list",
"data": [],
"has_more": false,
"url": "/v1/file_links?file=file_1Pkan4Igtd4f6uLzRL1wWM3i"
},
"purpose": "identity_document",
"size": 3929869,
"title": null,
"type": "jpg",
"url": null
}
}
This was the response
I think I have to use another method to upload the docs
Yes! After creating the file, it should attach to the account: https://docs.stripe.com/connect/handling-api-verification#handle-identity-verification
What bugs me is when I look via the API if anything is needed, I get empty results in the requirements property
"future_requirements": {
"alternatives": [],
"current_deadline": null,
"currently_due": [],
"disabled_reason": null,
"errors": [],
"eventually_due": [],
"past_due": [],
"pending_verification": []
},
"requirements": {
"alternatives": [],
"currently_due": [],
"errors": [],
"eventually_due": [
"id_number"
],
"past_due": [],
"pending_verification": []
},
Which connected account is this? Are you trying to verify in test or live mode?
Is this the account? https://dashboard.stripe.com/connect/accounts/acct_1PkYKDIgtd4f6uLz/activity
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Awesome I see the error now
So I need to upload the file, get the ID and then attach that ID back into the api onboarding
Yes, that's right!
So one more thing
Trying to route this payout to one of my connected accounts. I want to send them $5.
According to my current balance. I have more than enough
This is the error message I am getting:
"message": "You have insufficient funds in your Stripe account. One likely reason you have insufficient funds is that your funds are automatically being paid out; try enabling manual payouts by going to https://dashboard.stripe.com/account/payouts."
And this is the script:
import { NextApiRequest, NextApiResponse } from 'next';
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
export default async (req: NextApiRequest, res: NextApiResponse) => {
try {
const transfer = await stripe.transfers.create({
amount: 5000,
currency: 'usd',
destination: 'acct_1PkYKDIgtd4f6uLz',
transfer_group: 'CONSULTING_1',
});
res.status(200).json({ transfer });
} catch (error) {
res.status(400).json({ error: error });
}
};
This page shows both pending and available balance. The fund can only be paid out when it becomes available
I know this works because I did it on test as well.
So hang on. Where does it say pending and available. Its not so clear on dashboard
I'd recommend using the Balance Retrieval API to get the actual available balance: https://docs.stripe.com/api/balance/balance_retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Where does it say pending and available. Its not so clear on dashboard
The Dashboard doesn't show pending and available balance. We will share this feedback to the product team
Ok but the api will?
Awesome. Just built the API on local
it worked and it does show the difference
{
"balance": {
"object": "balance",
"available": [
{
"amount": 0,
"currency": "usd",
"source_types": {
"card": 0
}
}
],
"connect_reserved": [
{
"amount": 0,
"currency": "usd"
}
],
"livemode": true,
"pending": [
{
"amount": 941,
"currency": "usd",
"source_types": {
"card": 941
}
}
]
}
}
Thanks. So I just gotta wait for the available to have the funds, then I can do the payout
That's great! I'd recommend using available to determine when the funds are available to pay out
Do you know how long it take Stripe to make the funds available? Like 24 hours?
The payout speed depends on the country. From https://docs.stripe.com/payouts#manual-payouts:
In most regions, manual payouts typically take 1-4 business days to arrive in your bank account after initiating the manual payout.
Oh but will this arrive to my bank account or sit in my stripe dashboard?
I thought the money I have pending will be available on my stripe dashboard, where then I can do the transfer
sorry payout to the connect account
will this arrive to my bank account or sit in my stripe dashboard?
If the connected account is on manual payout, the available balance will sit in Stripe
If the connected account is on automatic payout, the available balance will be paid out automatically to connected account's external bank account
So my connected accounts that are my customers are on automatic. But where does it on the actual stripe dashboard of my business
When the funds are available in the platform, you will be able to make a transfer to the connected account. Once the connected account receive the transferred amount, the funds will be paid out automatically
This channel is for developers and technical integration questions. We don't have necessary expertise with Dashboard. For Dashboard related questions, our Support https://support.stripe.com/contact will be able to help
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Awesome. Thanks for your help. talking to them now