#Mickadelyon
1 messages · Page 1 of 1 (latest)
👋 happy to help
would you mind sharing the request ID? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_JkYRwoojTvzfXr
you're passing an empty source object
but in all cases why do you need a source? and how are you creating it?
require_once('../vendor/autoload.php');
require_once('../secrets.php');
\Stripe\Stripe::setApiKey($stripeSecretKey);
$customer = \Stripe\Customer::create([
"email" => $_POST["email"],
"source" => $_POST['stripeToken']
]);
$subscription = \Stripe\Subscription::create([
"customer" => $customer->id,
"plan" => $_POST['plan']
]);
// Récupération des données du formulaire
$token = $_POST['stripeToken'];
$plan = $_POST['plan'];
$email = $_POST['email'];
// Création du client
$customer = \Stripe\Customer::create([
'email' => $email,
'source' => $token,
]);
// Souscription du client à un plan
$subscription = \Stripe\Subscription::create([
'customer' => $customer->id,
'items' => [['plan' => $plan]],
]);
I'm not sure where did you get this from but this seems to be a very old integration
I wanted to do it with ChatGPT
ChatGPT's data model includes data up to 2021 which is a bit old and doesn't take into consideration deprecations and changes
within the Stripe APi
I understand, but when I tried alone, I couldn't do it
I sent you a guide that explains step by step how to achieve the integration either in low-code or with custom code