When my system creates a new yoga class subscription, I create a new Square Customer and Save the ID, add a customer card and save the ccof ID, and use these to create the subscription.
If a person later updates info (card info, swap plan, etc) I use the saved IDs to do the changes.
Over 4 years a person created several subscriptions at the yoga studio
First subscriptions created with SQUARE CUSTOMER ID 1V573H7H64XF5158C16NRTXXXX
Later subscriptions created with SQUARE CUSTOMER ID SSQJ4TS9R0TKZDG3DYDKS3XXXX
These customer IDs were merged on 02-24-2022 to CUSTOMERID 454BTM642N4H9DR88KBJTXXXX
ALL subscriptions created by the original IDs now show the MERGEd ID as the customer .
On 08-28-2024 this person created a subscription for a “partner” membership (140/month), using this info:
Customer ID: SSQJ4TS9R0TKZDG3DYDKS3XXXX
Subscription ID 1fa8743f-3825-4786-9925-f6ce32e4XXXX
Original Plan Variation: KLDAOR7DOEOH27AXHHDCXXX
I submitted this subscription using a ccof created by my subscription process:
“id”: “ccof:XXXXXXXXXXX” “card_brand”: “VISA”, “last_4”: “1780”, “exp_month”: 6, “exp_year”: 2025,
Sometime between then and 09-28-2024 the person “swapped” to an “everything” membership (108/month)
Swap-To Plan Variation: XSP2OGUNBIPELAUXG4X4XXXX
The subscription record for Subscription ID 1fa8743f-3825-4786-9925-f6ce32e4XXXX
shows 5 invoices: 1 Paid, 4 unpaid
inv:0-ChAd6pv8Hv0A2NwUheyL8MkYxxxx 2024-12-28 Unpaid automatic_payment_source: NONE
inv:0-ChBHCcN7qJKwGnvvUKuMVkYdxxxx 2024-11-28 Unpaid automatic_payment_source: NONE
inv:0-ChBYA1eCN2xSNmqqD6IGVG47xxxx 2024-10-28 Unpaid automatic_payment_source: NONE
inv:0-ChDX8rU4zNPtwfpZJxxu1E-Lxxxx 2024-09-28 Unpaid automatic_payment_source: NONE
inv:0-ChCQNexThlpqL9Ceq9fce5acxxxx 2024-08-28 Paid automatic_payment_source: CARD_ON_FILE
Please note that the Unpaid invoices began after the plan swap was intitiated
Since the original subscription was created with ccof:XXXXXXXXXXX, I assume this was the succesfully " paid with Card_on_file"
What I don’t understand is why ccof:XXXXXXXXXXX isn’t being found automtically by the invoice system?
One hint might be this:
When Customer Record is searched by SSQJ4TS9R0TKZDG3DYDKS3XXXX (subscriber info),
ccof:XXXXXXXXXXX is shown at the top of the ‘cards’ for customer
When Customer Record is searched by MERGED CUSTOMERID 454BTM642N4H9DR88KBJTXXXX
ccof:XXXXXXXXXXX is shown at the BOTTOM of the ‘cards’ for customer
I would appreciate your advice: Specifically:
-
Why did this “swap-plan” fail to auto-capture the existing ccof for the subscription? What should I have done differently?
-
Method to establish or update the card-on-file for subscription invoices for this subscription. If I establish a new ccof for this subscription does Square automatically update unpaid invoices with that info? or API process to do this? Or do I have to initiate individual payments? Do I manually use “UPDATE SUBSCRIPTION” API, updating the existing ccof?
-
When customers are MERGED why do the merged SUBSCRIPTIONS all appear when either an original ID or the merged ID is used in an API search by customerID – while merged INVOICES only appear after finding and then searching by the MERGED ID?
What is the significance of card placement (top or bottom of list) in the Customer record when this is changed by a MERGE? -
Why do some invoice.payment_made webhook events ACTUALLY show invoices NOT paid?
( [description] => We were unable to charge your card on file (VISA 7320) for this subscription.) But why did the webhooks for the unpaid invoices for this specific subscription NOT show “We were unable to charge”? Are there any wehook events for non-payment, or does each invoice.created and invoice.payment_made webhook need to individually searched? -
Is there an automated system set up to cancel unpaid subscriptions?
-
Now that there is MERGEd ID, should I update my database, merging the database person redords, and using the merged ID instead of the orginal id?