Is a Patron's pledge status still "valid" if they cancelled a year long membership before expiration?

My app is determining valid membership if a patron’s pledge is “valid”. I have a case where a patron signed up for a year long subscription, cancelled the subscription, but still has remaining time left until expiration, however they are not getting excess to the app, which tells me their pledge status is not valid. The Patreon dashboard shows this user’s subscription as still active, shouldn’t that also mean the pledge status coming from the API is valid? I’m still trying to determine exactly what their pledge status is so I can follow up if I can get that info. Thanks!

Depends on how you check for the pledge status. The patron cancels a pledge, the pledge is gone. But the payment exists. Check for currently_entitled_amount_cents or currently_entitled_tiers.