It is possible to embed an external js within a page in Ionic 4

My situation is that I need to load a checkout payment form that is in an external url, which is a script provided by the api in this format <script src = "{api_ambient} /v1/Scripts/PWCheckout.js?key= { PublicAccountKey} "type =" text / javascript "> </script> and then I have to interact with the second functions to which I must subscribe among other things.

Is it possible to achieve this?

Any help will be appreciated.

This is for google maps, but I think the way he adds the google maps script would work for you, specifically the injectSDK(): https://www.joshmorony.com/using-google-maps-and-geolocation-in-ionic-with-capacitor/

Estoy en la misma situaciĆ³n, lograste resolver?