To connect a subscription with a customer in your system, you need to create a checkout link for a Square subscription plan using the Checkout API’s CreatePaymentLink endpoint. This will generate a Square-hosted checkout page for buyers to pay and subscribe to the plan.
However, the Checkout API does not currently support the ability to specify a customer ID when creating a checkout link for a subscription plan. The customer is created or identified based on the phone number provided during the checkout process. If a customer with the provided phone number doesn’t exist in the seller’s Customer Directory, the API creates a new customer. If a customer with the provided phone number does exist, the API uses that existing customer.
After the buyer pays for the subscription, Square automatically creates a customer profile (if one doesn’t already exist) and adds a card on file to the customer profile. The card on file is then charged for the first priced subscription phase and for recurring payments as defined by the subscription plan.
If you need to connect the subscription with a specific customer in your system, you could potentially use the phone number as a unique identifier to match the Square customer with your system’s customer record.
This answer was reviewed by @Bryan-Square.