The "client_reference_id" argument is not passed
PHP Snippet 1:
class CheckoutController < ApplicationController
PHP Snippet 2:
cart = Cart.find(params[:id])
session = Stripe::Checkout::Session.create({
payment_method_types: ['card'],
line_items: [{
description: "Your product description",
name: "Name",
amount: 1999,
currency: 'eur',
quantity: 1,
}],
client_reference_id: cart.id,
mode: 'payment',
success_url: root_url,
cancel_url: root_url,
})
redirect_to session.url, allow_other_host: true