#ralph-product-creation

1 messages · Page 1 of 1 (latest)

wild comet
#

@timber belfry it depends a bit on your integration, what product(s) are you using?

timber belfry
#

Our web app basically has multiple car dealerships that sell car accessories to customers

#

So I'm using connected accounts to transfer the money directly to them

#

But we have thousands of products and creating them all in Stripe isn't realistic

#

I was trying to use vue-stripe but I just realized I can just use this:

#
$session = \Stripe\Checkout\Session::create([
  'payment_method_types' => ['card'],
  'line_items' => [[
    'name' => 'Stainless Steel Water Bottle',
    'amount' => 1000,
    'currency' => 'cad',
    'quantity' => 1,
  ]],
  'payment_intent_data' => [
    'application_fee_amount' => 123,
  ],
  'mode' => 'payment',
  'success_url' => 'https://example.com/success',
  'cancel_url' => 'https://example.com/cancel',
], ['stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}']);
#

I guess one point of confusion here is

#

How does the customer actually get redirected to the stripe checkout

wild comet
#

okay so you use Checkout Sessions

#

that allows you to create "on demand" or "ad-hoc" products/prices as needed

timber belfry
#

OK thank you for your help