StoreKit now has API to get billing issues related to subscriptions and display them without leaving the application.
Operating system will provide default implementation to report billing issues.
Starting this summer, if an auto-renewable subscription doesn’t renew due to a billing issue, a system-provided sheet appears in your app with a prompt that lets customers update their payment method for their Apple ID. No action is required to adopt this feature.Apple Developer
Feature is available in iOS and iPadOS 16.4 and newer, Mac Catalyst apps also have access to this API.