#shivam_kumar

1 messages · Page 1 of 1 (latest)

verbal tuskBOT
whole garnet
#

HI 👋

What response do you get?

fast bronze
#

Stripe\PaymentMethod Object
(
[id] => pm_1NOOCtR7SbLLaYoVU0K3Sbqd
[object] => payment_method
[billing_details] => Stripe\StripeObject Object
(
[address] => Stripe\StripeObject Object
(
[city] =>
[country] =>
[line1] =>
[line2] =>
[postal_code] =>
[state] =>
)

        [email] => poorvi@itradicals.com
        [name] => Poorvi Kalkani
        [phone] => 
    )

[created] => 1688058035
[customer] => 
[livemode] => 
[metadata] => Stripe\StripeObject Object
    (
    )

[type] => us_bank_account
[us_bank_account] => Stripe\StripeObject Object
    (
        [account_holder_type] => individual
        [account_type] => checking
        [bank_name] => STRIPE TEST BANK
        [financial_connections_account] => 
        [fingerprint] => D9gjnC82KLh0Ggne
        [last4] => 6789
        [networks] => Stripe\StripeObject Object
            (
                [preferred] => ach
                [supported] => Array
                    (
                        [0] => ach
                    )

            )

        [routing_number] => 110000000
        [status_details] => Array
            (
            )

    )

)

#

I got this response how I clone?

whole garnet
#

So you created the Payment Method on the Conencted Account?

fast bronze
#

No Platform customer already have payment method but I want to clone payment method in connected customer account.

whole garnet
#

Right, you did that

#

It created the Payment Method on Connected Account acct_1NCe8xR7SbLLaYoV

fast bronze
#

req_BmQ1zUHWxTTp09 this my request id

whole garnet
#

I am looking at the Payment Method object you provided above. It was created on the Connected Account.

fast bronze
#

Yes

whole garnet
#

That was successful

#

So what is your question now?

fast bronze
#

Can platform customer pay to connected account?

whole garnet
#

You need to create a new Customer object on the Connected Account and attach the new Payment Method to that Customer if you want to be able to re-use the payment method

#

We mention this at the bottom of the doc you linked

#

If you want to reuse PaymentMethods on a connected account, attach them to Customers before using them with PaymentIntents to create charges. You must provide the Customer ID in the request when cloning PaymentMethods that are attached to Customers for security purposes.

fast bronze
#

Is Customer ID means connected customer id and PaymentMethods means platform customer payment methods?

verbal tuskBOT
dire root
#

Hello! I'm taking over and catching up...

fast bronze
#

$payment_method = \Stripe\PaymentMethod::create([
'customer' => 'cus_OAiqrCqjjg0lkE',
'payment_method' => 'pm_1NONPiJ3dxAQpMxWFe1nOktG',
], [
'stripe_account' => 'acct_1NCe8xR7SbLLaYoV',
]);

    $payment_method_attach =$stripe->paymentMethods->attach(
        $payment_method->id,
        ['customer' => 'cus_OAjwmXzMfLagha'],
        [
            'stripe_account' => 'acct_1NCe8xR7SbLLaYoV',
        ]
    );
    pred($payment_method_attach);

yes I do this thing is my code is right?

dire root
#

Typically the way cloning works is you have a Payment Method attached to a Customer on your platform account, then you clone it to connected accounts for each direct charge. So the steps would be 1) clone the Payment Method 2) create a Payment Intent on the connected account using the new cloned Payment Method.

#

It's unusual to attach a cloned Payment Method to a Customer on the connected account, but it is technically possible.

fast bronze
#

yes I have already have Payment Method in connected account.

dire root
#

Okay, can you tell me more about what's blocking you from moving forward?

fast bronze
#

$payment_method = \Stripe\PaymentMethod::create([
'customer' => 'cus_OAiqrCqjjg0lkE',
'payment_method' => 'pm_1NONPiJ3dxAQpMxWFe1nOktG',
], [
'stripe_account' => 'acct_1NCe8xR7SbLLaYoV',
]);

    $payment_intent = $stripe->paymentIntents->create([
            'amount' =>  1000,
            'currency' => 'usd',
            'payment_method' =>  $payment_method->id,
            'payment_method_types' => ['card', 'us_bank_account'],
            'application_fee_amount' => 123,
            'confirm' => true,
        ],
        ['stripe_account' => 'acct_1NCe8xR7SbLLaYoV']
    );

is this perfect ?

#

'customer' => 'cus_OAiqrCqjjg0lkE',
'payment_method' => 'pm_1NONPiJ3dxAQpMxWFe1nOktG',
I pass platform account values

dire root
#

I can't audit your code for you. What happens when you try this in test mode? Does it do what you expect?

fast bronze
#

I want platform customer can make payment to connected account and this code is working right.

#

Is my approach is right?

dire root
#

It looks generally correct, yes, but you should test it in test mode to make sure it works as you expect.

fast bronze
#

I am working on a rental site I am creating platform account form renter and connected custom account for landlord and I want to make payment flow to renter to landlord.

#

This code will works perfect if my site live?

dire root
#

I can't tell you if the code will work perfectly or not. The only one who can determine if your code is working as intended or not is you. You need to run it in test mode and confirm it does what you expect.

fast bronze
#

Ok thank you

#

I have one question not related to my any query. I am a php developer can I join stripe as a fresher software developer I am just asking If you don't want to answer me for my this question then Ok No problem.

dire root
fast bronze
#

I already check this but I am not found any fresher job.

#

I don't know, how stripe hire freshers?

dire root
#

Not sure what "freshers" means.

#

But all of our open roles are on that page.

fast bronze
#

Ohh freshers means I have very low experience , I am only 6 month experience.

#

Can I have your linkdin?

#

I want a person who guide me perfect in my career.

dire root
#

No, sorry, we don't give out our personal information here.

fast bronze
#

Ok no problem

#

Ok give me an answer please is dsa important for stripe interview

dire root
#

I can't answer questions about Stripe interviews here. This server is focused on developer quesitons for integrations.

fast bronze
#

Ok sorry