I just updated my code to Stripe Payment Intents API and I want to make a subscription to a plan just after the payment.
- When the customer installs the app, a subscription to it is created with a trial period
When he wants to pay for a longer period, he goes on a page in which he first select the plan he wants, then fill his customer informations (name, mail etc.).
Then I make a post request to /payment_intents with these four informations:
amount (Amount of the plan)
currency
payment_method_type[]
customer
I then send the client_secret returned by the request to my js script in order to process the payment.
If the payment succeeds I update the subscription on POST /subscription/id and set trial_end=now
But on the Dashboard, I see on my customer page there was two payments:
I (think I) know the second charge is made by the subscription, but how can I make a subscription without creating a new charge ?
Thanks for any help!