Interacting with a custom script at runtime

Hi!

I’m trying to set up a payment gateway (sadly, stripe doesn’t work in my country).

I want to use this script and change its data dynamically: Widget & Checkout Web · Wompi Docs

I created a custom HTML form and what I’m doing is changing the whole HTML code at runtime but every time I do that the button disappears. How would you guys go about achieving this?

Sorry I’m not sharing a link to the app, I have some keys there that aren’t public and without them, it doesn’t work.