Need help Understanding Square Subscription API and SDK

:wave: With Square Subscriptions API invoices will be the mechanism that will charge or bill the customer. The Payments API isn’t used for subscriptions. During your onboarding flow you’ll want to have your customer save the card on file with the Web Payments SDK and Cards API prior to creating the subscription. Then you’ll have the card_id for the customer to pass in at the time of subscription creation. :slightly_smiling_face:

  1. The event to cancel a subscription is to cancel that customers subscription. Not the plan. The customer_id is part of the subscription which is why it’s not needed in the cancel POST.

  2. Canceling a subscription won’t cancel it immediately. It will still be active till it’s charged_through_date However you’re application can subscribe to Invoice webhooks to be notified when a webhook subscription isn’t paid and disable the customers ability to get coffee based on the invoices payment status.

  3. Any creation or updates to the subscription will trigger a Subscription webhook event. Any payment of a subscription will trigger an Invoice, Payment, and Order webhook events.

  4. Creating a duplicate customer won’t error out. You’ll have a duplicate and should be aware of any merge events of duplicate profiles.

When duplicate customer profiles are identified and merged, either manually by the seller or using automated detection, the existing profiles are merged into a single profile that is assigned a new ID.

If you specify the ID of a customer profile that was deleted in a merge operation, the Customers API returns the new customer profile. For example, suppose customers A and B are merged and a new customer C is created. If you call RetrieveCustomer using the ID of customer A or B, the Customers API returns customer C.

:slightly_smiling_face: