I see the code here: gform_subscription_canceled - Gravity Forms Documentation
BUT I don’t quite believe it will work. What I want is for the user role to be downgraded when a stripe subscription is cancelled via the stripe portal.
The wording for this snippet is confusing. It says “This example shows how you can downgrade the user role when a subscription is canceled via one of the credit card based payment add-ons.”
The payment addons don’t have a cancellation feature. The cancellation is via stripe and notify Gravity Forms via a webhook.