#damonstrr

1 messages ยท Page 1 of 1 (latest)

signal prismBOT
wraith imp
#

Hello ๐Ÿ‘‹
Default payment method for what exactly? Subscriptions?

misty stirrup
#

I have this

$response = app('stripe')->checkout->sessions->create([
            'payment_method_types' => ['card'],
            'mode' => 'subscription',
            // 'automatic_tax' => ['enabled' => true],
            'line_items' => [
                [
                    'price' => $plan->stripe_price_id,
                    'quantity' => 1,

                ],
            ],

            'subscription_data' => [
                'application_fee_percent' => $plan->applicationPercentage(),

                'metadata' => [
                    'blog_id' => $blog->id,
                    'post_id' => $latestPost->id,
                    'user_id' => $blog->user->id,
                    'user_email' => $blog->user->email,
                    'name' => $plan->name,
                    'reader_id' => Auth::user()->id,
                    'price_id' => $plan->stripe_price_id,
                    'product_id' => $plan->stripe_product_id,
                ]
            ],

            'client_reference_id' => Auth::user()->id,
            'success_url' => route('blog.checkout.success', ['blog' => $blog->name, 'plan' => $plan->slug]),
            'cancel_url' => route('blog.post.show', [$blog->name, 'post' => $latestPost->slug]),
            'metadata' => [
                'post_id' => $latestPost->id,
                'user_id' => Auth::user()->id,
                'name' => $plan->abbreviation
            ],
            'customer_email' => Auth::user()->email,
        ], [
            'stripe_account' => $stripeAccount,
        ]);

how do i set default payment method for the customer

#

also does invoice get sent in test mode after subscription??

wraith imp
#

Typically you'd use the update customer endpoint to update customer.invoice_settings.default_payment_method to set a default payment method on the customer
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method

also does invoice get sent in test mode after subscription??
We don't send emails in test mode

misty stirrup
wraith imp
misty stirrup
#

So another question is that if a customer subscribes, if no default method is set. Will the payment method they used on the checkout session be billed?

wraith imp
#

When you create a checkout session in subscription mode, the payment method the customer provides during the Checkout flow gets used for billing

misty stirrup
#

oh make sense then

#

Can automatic tax be enabled for connected account

#

or does the connect account have to set it individually??

wraith imp
misty stirrup
#
$updateUser = app('stripe')->accounts->create([
            'type' => 'standard',
            'email' => $request->user()->email,
            'business_type' => 'individual',
            'business_profile' => ['url' => $blogUrl]

        ]);

        $blog->update(['stripe_account_id' => $updateUser->id]);


        $response = app('stripe')->accountLinks->create([
            'account' => $blog->stripe_account_id,
            'type' => 'account_onboarding',
            'refresh_url' => route('blog.stripe.connect', $blog),
            'return_url' => route('blog.stripe.verify', $blog),
        ]);

i guess it is on connected account then right?

wraith imp
#

That code is just creating standard connected accounts

misty stirrup
#

Yeah the link you sent does not say though

signal prismBOT
wraith imp
misty stirrup
#

Cheers

#

If i may ask for a market place which is preferrable standard or express??

vapid blade
#

๐Ÿ‘‹ Stepping in for my teammate

misty stirrup
#

cheers

misty stirrup
#

For a platform that allows author make money from readers on article subscription. What Preset product tax code is recommended??

vapid blade
#

I can't advise on which tax codes to use, and neither can our support team. I recommend discussing this with a tax professional