#wixPay1 (Payment button) - Accepting Payments

Hey,

Recently I have been diving into payment acceptance for Wix websites. I found out the payment processing with Wix and Stripe is quite complicated (of course for security purposes).

Anyhow, I want a payment button on my website. Wix has “default” payment buttons that I really like as they automatically include every payment method that is accepted by me. However, I cannot find any references or functions on how to combine code with the buttons.

What I have →

  1. Wix Premium Business Plan
  2. Stripe as my default payment provided (Accepting Credit/Debit / iDeal / Paypal)

What I want →

  1. Users to press a ‘Pay’ button which results in the same pop-up where users can select their desired payment method.
  2. An event that retrieves when a payment is successfully fulfilled or failed (e.g. a redirect or query action)
  3. [Not necessary but would be great] A manner to change the product name and product price in the code.
  4. [Not necessary but would be great] A way to prefill the fields in the first part of the payment lightbox and even restrict users from making changes to the fields. →

Resources I have actively studied so far:
https://www.wix.com/velo/forum/tips-tutorials-examples/example-stripe-payment-processing
(GREAT Example, but I feel like it is overcomplicating what I want to achieve (I could be wrong here) and lacks other payment methods)

https://stripe.com/docs/api/checkout/sessions
(For trying to retrieve the checkout information as it is visible in "logs’ on my Stripe developer dashboard.)

https://gist.github.com/shanwixcode/95432c1e608efc1603144ec35a61dbd5
(Great code for understanding the connection between Stripe and Wix but focussed on subscriptions instead of one time payments)

Thank you for any help you might be able to offer!
If any additional material (screenshots, code etc.) is necessary to further underline this specific code, please say so :wink: