#Naigtraider-connect

1 messages ยท Page 1 of 1 (latest)

signal nest
#

Hi there ! ๐Ÿ‘‹ Can you start with a summary of what you're trying to do?

steady cave
#

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

signal nest
#

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.

steady cave
#

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

signal nest
#

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.

steady cave
#

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

warm violet
#

Hi ๐Ÿ‘‹ I'm stepping in as @signal nest needs to run.

steady cave
#

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?

warm violet
#

What about this do you want to change?

steady cave
#

add stripe_account and have the money deposited into that account

warm violet
#

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

steady cave
#

` $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?

warm violet
#

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

steady cave
#

i will take a screenshot

warm violet
steady cave
warm violet
steady cave
#

ok ok

#

account is a express

warm violet
#

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

steady cave
#

Yes