Struggling with Stripe Checkout button integration

I want to use the checkout button provided by Stripe (been trying to do so for three days, watched a lot of tutorials on YouTube…etc:

The problem is that it doesn’t show properly, I have followed a tutorial for Wordpress and you only needed to copy paste the code and when you click on Pay by card button the payment form opens in full screen and shows properly. But when I do the same in Wix the size of the payment form depends on the size of the HTML item (which is a relatively small square) but when I make it bigger I don’t have the possibility of placing the button where I want (it shows in upper right side of the form).

Here’s the code:


<script src="https://checkout.stripe.com/checkout.js"></script>

<button id="customButton">Purchase</button>

<script>
var handler = StripeCheckout.configure({
  key: 'pk_test_xxxxxxxxxxxxxxxxxxxxxxx',
  image: 'https://stripe.com/img/documentation/checkout/marketplace.png',
  locale: 'auto',
  token: function(token) {
    // You can access the token ID with `token.id`.
    // Get the token ID to your server-side code for use.
  }
});

document.getElementById('customButton').addEventListener('click', function(e) {
  // Open Checkout with further options:
  handler.open({
    name: 'Website',
    description: 'Service',
    amount: 2000
  });
  e.preventDefault();
});

// Close Checkout on page navigation:
window.addEventListener('popstate', function() {
  handler.close();
});
</script>

Can anyone help me with this? A solution would be to place the (Pay by card) button in the bottom center of the payment form (or HTML item) (I figured this can be done by CSS but I don’t have any coding skills, also I have contacted Wix support who told me to contact Stripe who again told me to contact Wix, I wonder if Wix was the right choice after all.)

Thanks.

Take a look at the Stripe Payment Example . This should show you everything you need to get this working on your site.

Good luck

Thanks I will check it out.

this page also helps: https://www.wix.com/corvid/forum/community-discussion/wix-code-stripe

Hello, sorry to bother you but these 2 links are not a correct answer to Jack’s request. I actually have the exact same.
Just to be precise. Stripe Checkout is specific. It is not like Stripe Elements. It is supposed to be simpler to set up. A bit of code to copy paste somewhere in Wix (as it is on Wordpress and apparently simple), then a button on the page that triggers a Stripe Checkout pop-up when clicked.
This is Stripe Checkout: https://www.wix.com/corvid/forum/tips-tutorials-examples/example-stripe-payment-processing

I would be very grateful if you could provide a step–by-step tutotial of Stripe Checkout integration. I guess this would be worthwhile not only for me as Stripe Checkout is very popular for no-coders of begginers like me.

Thanks in advance.

You might be able to use an HtmlComponent . For more information, see the article Working with the HTML Component in Corvid .

Understand that this forum is not a support site. It is a community of Corvid developers and users where coding and development topics are discussed and information shared.

If you find that you are having difficulty with code and need assistance, you may want to check out the Wix Marketplace - it’s a place where you can look for Corvid experts for hire.

I need help} with this stripe integration of a thing to accept payment from my booking website, stripe is not available on the dashboard to accept payment… I found out it requires integration from the wix backend modules… Please how do I go about this or if you can recommend a video link
Thanks