We advise against creating payments via jQuery. If you use jQuery, others may be able to retrieve your API key from the client-side source code by monitoring the API calls via the inspector network tab of their browser. Also, the check on whether a payment was successful can easily be skipped by adjusting the JavaScript code.
If you would like to use jQuery to integrate our API into a single page website, you can use it to make an AJAX call to your backend. In this case, a payment will be created in your backend and the payment URL is sent back to the customer. The customer then redirects the user to the payment URL.