In my stripe payment intent example, My code works fine with amount, currency and payment i can see received in stripe. please check my code below
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $obj1,
'currency' => 'gbp',
'metadata' => [
'order_id' => $invID,
'name' => $name,
'email' => $email,
], ]);
But i want to add in my create file following fields so it means these variable should transfered to stripe plus recurring payment,
can anyone please edit code and update it for me to make it work. I am not good in php coding and stuck from last few days. thanks in advance.
That's not how the Stripe APIs work though. PaymentIntents alone can't charge users on a monthly bases, you need to create a subscription for them instead.
You also can't provide name, email, address and product title directly to the PaymentIntent object. You can however create a customer object and pass their ID in to customer
parameter which allows you to associate the PaymentIntent to a customer.
Customer object can store name, email and address. For product title, you can use PaymentIntent metadata
property