I need a button on a form and pressing this button should send a HTML form using a POST method to a configured external URL (handled by an external API, not Eximee).
This call would return with a 302 Redirect Response, which in turn should redirect the user from the form to the URL this response redirects to.
Here You create whole logic for template in HTML tab. You are letting button to be pressed only onece by disabling it after first click. Then script retrieves data from component input and passes them to form. At the end form is submitted. Response with status 302 is handled automatically so no additional actions are needed to redirect user from form to link returned by external api.
When You have Your Custom Component ready it is time to use it in form. Custom Components are added as usual by by drag and drop in Add Component menu, just remember to switch tab to Custom Components. After that add input parameters for component. Donβt forget to add listeners when input parameters are not constant.