When I did this I had to manually add a subscription. Basically check to see if the sub already exists and if not, create one. Otherwise they will get nagged for payment details.
Jun 29, 2017
1
Level 2
User creation process
Hi ! I am using Spark in my app but the User registration process is external, so I made a Webhook from Stripe to a custom controller and I want to create manually the User in database and then carry on to natural Spark process.
So if user does not exist I create the user in database with Stripe webhook data and then I want to call :
$invoice = $user->findInvoice($payload['data']['object']['id']);
as in
StripeWebhookController@handleInvoicePaymentSucceeded
My question is do I have to also create the subscription record or it will be automatically created in the next calls ?
Thank you very much for your help !
Please or to participate in this conversation.