#alexis.saviot

1 messages · Page 1 of 1 (latest)

steel coralBOT
austere brook
willow widget
#

I do this : $session = \Stripe\Checkout\Session::create([
// 'payment_method_types' => ['card'],
'line_items' => [[
'price' => 'price_1N5n6KIihUWcN3e1ztlJRX0H',
'quantity' => $count,
]],
// 'billing_address_collection' => 'required',
'shipping_address_collection' => [
'allowed_countries' => ['FR', 'BE', 'CH']
],
'metadata' => [
'product_name' => "standard",
"customer_id" => $user['id'],
"quantity" => $count,
"tax" => $tax,
'price' => $this::$config['FORMULA']['standard']['price'],
],
'customer' => $user['stripe_id'],
'mode' => 'subscription',
'success_url' => $this::$config['APP_URL'] . 'paiement-succes',
'cancel_url' => $this::$config['APP_URL'] . 'paiement-annule',
'payment_method_collection' => "always", // set to always for futur payment (eg. subscription update)
// 'customer_email' => $user['email'],
]);

#

where stripe_id is the customer id from the customer in stripe

austere brook
#

Yes, there is no way to pre-fill address on Checkout Session