#Naigtraider-connect
1 messages ยท Page 1 of 1 (latest)
This is an application, what I want to do is that all the payments made by the application clients are connected to the stripe connect account, that is, the money is transferred to that account
I need way more information about what you're trying to do. So far I have that you want the platform (e.g. your account) to have a number of connected accounts (e.g. accounts that belong to your clients) that create transfers to your account.
If what I need is to be able to connect 1 stripe connect account with this code, so that the payments made are deposited directly to the stripe connect account
What do you mean by 'connect 1 stripe account'?
What are the steps here? I need to know the desired lifecycle of the transaction from start to finish in order to help you.
The application has several businesses, each business has its stripe connect account, what I want is for each business to have its money directly
Example; I buy a product, which has a cost of 10 dollars, those 10 dollars belong to the store store1
Hi ๐ I'm stepping in as @signal nest needs to run.
Can you do me a favor and read this doc on Connect and then let me know which parts do or do not match what you are trying to accomplish?
https://stripe.com/docs/connect/enable-payment-acceptance-guide
in point 4
`// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
\Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
$session = \Stripe\Checkout\Session::create([
'line_items' => [[
'price' => '{{PRICE_ID}}',
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => 'https://example.com/success',
'cancel_url' => 'https://example.com/cancel',
'payment_intent_data' => [
'application_fee_amount' => 123,
],
], ['stripe_account' => '{{CONNECTED_ACCOUNT_ID}}']);
// 303 redirect to $session->url`
how to add in my code?
What about this do you want to change?
The stripe_account parameter is included in that code snippet
You would only need to supply a {{PRICE_ID}} and {{CONNECTED_ACCOUNT_ID}} to have that checkout form handle payments for your connect account
` $lineItems = [];
array_push($lineItems, [
'price_data' => [
'currency' => \Str::lower(setting('currencyCode', 'USD')),
'product_data' => [
'name' => "Wallet Topup",
],
'unit_amount' => $walletTransaction->amount * 100,
],
'quantity' => 1,
]);
\Stripe\Stripe::setApiKey($paymentMethod->secret_key);
`
this is the code of my application add stripe_account in my code?
I don't know what this code is doing. There's an array definition and a setting of an API key but it doesn't make any sense to me
i will take a screenshot
What type of connect accounts are you using? https://stripe.com/docs/connect/accounts
What kind of charges are you using? https://stripe.com/docs/connect/charges
How are you accepting money? https://stripe.com/docs/connect/creating-a-payments-page
These appear to be about top ups, which are something else entirely: https://stripe.com/docs/api/topups
Okay so you make Destination Charges or Separate Charge & Transfer
From what you said it sounds like Destination Charges
In that case the first tab on the Create a Payment Page link I shared should help get you started
Yes