#stephy
1 messages · Page 1 of 1 (latest)
Hi there, how can I help?
Actually I need to integrate ACh payment integration so how can I do this?
Are you talking about ACH direct debit? https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=checkout
I have some doubt regarding this
My requirement is there is a main owner and his there is some vendors under the owner owner get amount from vendors and owner transfer the amount to each vendors accounts ..so my client need the ach payment integration....so I confused where I start? The owner have the account numbers of vendors...which method and api used for them
So the owner will transfer funds to the vendors, so that the vendor scan pay out to their own bank accounts, is this the correct understanding?
Vendors will enter their bank account and routing number so then owner transfer the amount to the vendors entered account
My client ask me to add bank account via ach and do ach debit or credit payment method
I believe we talked about it yesterday and I've told you that you need to use Stripe connect to onboard the vendors as connected accounts, so that you can transfer funds from your accounts to those connected accounts. Have you got a chance to read through the doc I shared yesterday? https://stripe.com/docs/connect/accounts
Yes I read it I create a connected account using account:: create api also
But I got like this
Copy and paste the account ID here
OK. I saw you have created an express account, and also set up its payout bank account
However this account is restricted because there're past_due requirements.
That means what I use api to create this
$bankAccountToken = Token::create([
'bank_account' => [
'country' => 'US',
'currency' => 'usd',
'account_holder_name' => $request->input('account_holder_name'),
'account_holder_type' => 'individual',
'routing_number' => $request->input('routing_number'),
'account_number' => $request->input('account_number'),
],
]);
// Create a Stripe account
$account = Account::create([
'type' => 'express',
'country' => 'US',
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
]);
// Attach the bank account to the Stripe account
$account->external_accounts->create([
'external_account' => $bankAccountToken->id,
]);
// Create a customer and link it to the Stripe account
$customer = Customer::create([
'email' => $request->input('email'),
'source' => $bankAccountToken->id,
]);
// Update the Stripe account with the customer ID
$account->metadata->customer_id = $customer->id;
$account->save();
// Return the account ID and customer ID to the front-end
return response()->json([
'account_id' => $account->id,
'customer_id' => $customer->id,
]);
}
I use above api to integrate this one?
https://stripe.com/docs/connect/express-accounts#create-link you should use the account link API to create an onboarding link. Open the link and go through the onboarding process.
You mean that I have create account link..ok after that how to made transfer amount from owner to vendors?
You need to complete the onboarding and make sure its payout_enabled is true https://stripe.com/docs/api/accounts/object#account_object-payouts_enabled
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
After that you can use the Transfers API to transfer funds to the connected account (https://stripe.com/docs/api/transfers), once the funds are available, it's be paid out the bank account based on its payout schedule (https://stripe.com/docs/api/accounts/object#account_object-settings-payouts-schedule)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I got a error not a valid url
Hi! Can you share the request ID (req_xxx)? 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 center 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.
req_hHCTKTSMbros5a
As the error message mentioned, the URL that you specified in business_profile[url] is invalid.
👋 Taking over this thread, catching up now
Am in test mode so which url I will give?Where I get the url
You can set to your company URL or any proper URL in test mode for testing purpose
So I can just give my site url is enough?
Yup!
Why will provide the this URL actually?
If Stripe Connect is used, the URL represented the business website of the connected account (vendors in your case)
In live mode, it should be filled with real business URL of connected account
Ok..that means in my case I create a website for my business so I have to give that website url here?
As mentioned in the error message, you'd need to go to https://dashboard.stripe.com/settings/connect to complete setting up the branding of the onboarding link
Have you set it up?
I'd recommend following the instructions in error message
Ok..that means in my case I create a website for my business so I have to give that website url here?
Not your website URL, but the website URL of your vendors
If you don't have connected account/vendor's URL, you don't have to set business_profile.url in the account creation request
You'd need to add icon as explained in the error message
Could you follow the instructions in the response? https://dashboard.stripe.com/test/logs/req_HLDVCfi1VyJWcD
You must update your Connect branding settings with icon in order to create an account link. You can set the missing fields at https://dashboard.stripe.com/settings/connect
Both are same we have a website which have vendors customers and the main owner also the dealings all going on this site and after work completion the owner payed the corresponding vendors through the site using the ach payment
I got error but that error not in logs actually
Which request or steps did you perform that resulted in this error?
$bankAccountToken = Token::create([
'bank_account' => [
'country' => 'US',
'currency' => 'usd',
'account_holder_name' => $request->input('account_holder_name'),
'account_holder_type' => 'individual',
'routing_number' => $request->input('routing_number'),
'account_number' => $request->input('account_number'),
],
]);
// Create a Stripe account
$account = Account::create([
'type' => 'express',
'country' => 'US',
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
'business_type' => 'individual',
'business_profile' => ['url' => 'https://phplaravel-813399-3371113.cloudwaysapps.com/'],
]);
$accountLink = AccountLink::create([
'account' => $account->id,
'refresh_url' => 'https://phplaravel-813399-3371113.cloudwaysapps.com/refresh',
'return_url' => 'https://phplaravel-813399-3371113.cloudwaysapps.com/return',
'type' => 'account_onboarding',
]);
// Attach the bank account to the Stripe account
$account->external_accounts->create([
'external_account' => $bankAccountToken->id,
]);
// Create a customer and link it to the Stripe account
$customer = Customer::create([
'email' => $request->input('email'),
'source' => $bankAccountToken->id,
]);
// Update the Stripe account with the customer ID
$account->metadata->customer_id = $customer->id;
$account->save();
// Return the account ID and customer ID to the front-end
return response()->json([
'account_id' => $account->id,
'customer_id' => $customer->id,
'account_link_url' => $accountLink->url,
]);
Am used this one
It's agu. Restricted mode
There were a few requests to Stripe made in your code. Which exact line that threw the error?
You have to debug your own code to identify which line threw the error, so that I could help you further
That error happnd when I attacj bank account to the stripe account
$account->external_accounts->create([
'external_account' => $bankAccountToken->id,
]);
If you use Express connected account, you don't have to create external accounts. The onboarding flow will create the external account for you.
So I should remove that ?
Why this issue?
After removing that my error is gone but still the account is restricted mode
So this is why?
Have you completed the onboarding flow in the onboarding link created?
$account = Account::create([
'type' => 'express',
'country' => 'US',
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
'business_type' => 'individual',
'business_profile' => ['url' => 'https://phplaravel-813399-3371113.cloudwaysapps.com/'],
]);
$accountLink = AccountLink::create([
'account' => $account->id,
'refresh_url' => 'https://phplaravel-813399-3371113.cloudwaysapps.com/refresh',
'return_url' => 'https://phplaravel-813399-3371113.cloudwaysapps.com/return',
'type' => 'account_onboarding',
]);
First I create account and the. Create link
After this one new account is created in my connect section..where am seeing that account is in restricted mode
Have you filled up the details in the onboarding link with the test data https://stripe.com/docs/connect/testing?
The connected account won't be completed if you don't fill up the onboarding details in the onboarding link
I can't understand .I done averything via api so where i fill up the details
Can you explain me in the basics of api
When you create an account link with AccountLink::create function, url(https://stripe.com/docs/api/account_links/object#account_link_object-url) parameter in the response will contain a URL of the onboarding link. You need to go to the URL to fill up the details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
For example in https://admin.corp.stripe.com/request-log/req_14hmTy1gg3Hqpk, the response returned:
{
object: "account_link",
created:
1684474709
,
expires_at:
1684475009
,
url: "https://connect.stripe.com/setup/e/acct_1N9M1HAcaaoPSRj7/xxx",
}
You have to go to https://connect.stripe.com/setup/e/acct_1N9M1HAcaaoPSRj7/xxx to complete the onboarding process
Completing the onboarding details can't be done via API
It has to be done via the onboarding URL
But if am doing it via back end then how would this possible if a vendor have a form to fill up the details like account number and routing number then how would done all these things..
So I should complete this to go url???
Yes
Your system should direct the vendors to this URL to complete the onboarding process by filling up the details
But if am doing it via back end then how would this possible if a vendor have a form to fill up the details like account number and routing number then how would done all these things..
The onboarding URL will collect the bank details
Can you try to complete the onboarding process and check how the bank account collection is like in the onboarding page?
Now the process completed
Now I want to transfer funds
So how can I send funds through api?
You can use Transfers API as explained here: https://stripe.com/docs/connect/charges-transfers
I integrated this also get a error
req_usdutgZpTI8RMz
$transfer = Transfer::create([
'amount' => 1000, // Amount in cents (e.g., $10.00)
'currency' => 'usd',
'source_type' => 'bank_account',
'destination' => 'acct_1N9MpiPPKs5BjnsC', // Replace with the ID of the destination account
'description' => 'Transfer from John Doe',
]);
You need to have sufficient balance in your platform in your account for transfer as mentioned in the error: https://dashboard.stripe.com/test/logs/req_usdutgZpTI8RMz
You have insufficient funds in your Stripe account for this transfer. Your ACH 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).
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
It's likely that your platform has insufficient balance to transfer
Then how can I add balance through my api?
You can make a payments with bypassing pending balance test card, so that the platform will have available balance for transfer: https://stripe.com/docs/testing#available-balance
Alternatively, topping up platform balance is supported in US platform: https://stripe.com/docs/connect/top-ups
Is this source type and averything that I entered correct?
Where is the funding source of your balance? If it's from payments accepted from customer, then you can use the default card
Not understand
From the error message, your platform (owner) account doesn't have enough funds to transfer to the connected account (vendors)
Do you get the funds from collecting the payments from customer or by topping up I suggested earlier?
By default, you shouldn't need to set source_type
The primary problem here is how do you make sure the platform (owner) to have sufficient funds for transfers
I give my source_type as bank_account then this error occur,,,after udpating source_type to card it's work
The default of source_type is card. You probably don't need to set it unless necessary
In ach payment can we use card?
The source_type refers to where the source balance is from irregardless how the connected account is paid out
If the your source balance only has card (https://stripe.com/docs/api/balance/balance_retrieve), then you can just use default_source as card