Reading around some, I have not found this setup yet.
My public landing page hosts a signup button (only) that goes to Square via a payment link I setup on the backend when handling the button click. There is no user data on my system and no account for their subscription is setup at this point. I am aiming for just the signup button and no other form fields at this point.
They do the Square thing and get redirected to my success page. I tell them I will send an email.
When the payment.updated webhook fires, I store the data, fire off a HTTP200 to the webhook, then use their email to create an account on my server. This does an initial password and the email as a temp username.
I am adding a second system for free accounts to upgrade, but I have some acct data for these folks and pass that along to get it in the payment.updated webhook. This part works.
Overall, I would like to assign the account ID to their membership, so that future webhooks can be applied to their account.
I am lost as to what data tracks where to get from the payment object to the subscription object.
Near as I can tell from forum answers, I need to create a new customer (no real data) every time I make the payment link and redirect the user in the hopes they complete the order. This seems excessive, so along with confirming this idea, can I somehow get the subscription ID from the Payment.Created webhook event by tracing through some chain of related data? I see the order, but that API does not have the customer. Tracing the subscription API backwards, I seem to need the Customer who is not in the Payment or Order responses.
Is the only way to do this frictionless signup would be to create a customer and store them as I create the payment link by API and redirect?
Being an automated subscription for web access, I need to ensure that I am tracking customers, subscriptions, payments and the like automatically.