I’m using Subscription API in Square Python SDK to create a subscription model. I am starting the subscription at a later phase by setting start date as future date.
Than using the subscriptions.updated
webhook to update the status of subscriptions from PENDING to ACTIVE when they are actually charged.
For Cancel subscription I don’t know which status it is being used as square uses Schedule to cancel as default method.
Below is my log of the webhook where the status showing still ACTIVE.
Webhook received and verified: {"merchant_id":"MLV40AZWCSJBM","type":"subscription.updated","event_id":"af95d3c7-4b69-3b2e-abf3-ec5d0d42bc29","created_at":"2024-06-26T11:29:32.058Z","data":{"type":"subscription","id":"fcdb3de3-ed1d-4d7f-b528-36d13e4445f6","object":{"subscription":{"canceled_date":"2024-07-26","card_id":"ccof:CA4SEGVk8dydUu1YVrdUOknQA88oAg","charged_through_date":"2024-07-26","created_at":"2024-06-26T11:15:55Z","customer_id":"98MX7M8P10JWJ18F24J1703PMW","id":"fcdb3de3-ed1d-4d7f-b528-36d13e4445f6","invoice_ids":["inv:0-ChCeEpL756n_Uhzv4EMryuSYENkJ"],"location_id":"L655HC47K33ZY","monthly_billing_anchor_date":26,"phases":[{"order_template_id":"z4NzVZEJHZJK7ticXIuHTS6Cld4F","ordinal":0,"plan_phase_uid":"46IQTR2ZRGFB4P6QZWS42IO5","uid":"605b60ac-2d77-4181-ac48-8554952a8919"}],"plan_variation_id":"BC7YR4URYBJCD7RFK4PS2N2H","source":{"application_id":"sandbox-sq0idb-8FEocT_f4vLwpO2c8YlNaQ","application_name":"Sandbox for sq0idp-c5DMcnvitc6TR9nEU9lynA","name":"BC7YR4URYBJCD7RFK4PS2N2H"},"start_date":"2024-06-26","status":"ACTIVE","tenant":"BUYER","timezone":"UTC","version":2}}}}
Let me know What should I do here …