Using Stripe Checkout for card payment

Could anyone spare a few moments to provide a point by point walk-through of embedding Stripe checkout card payment into a site, please?

Also see Integrate stripe into blocs - SOLVED

Thanks,

Will

1 Like

Umm. Looks like you answered your own question.

Sorry, I’ve read that piece. What I’m actually wondering is if the entire code goes into the HTML block or whether any goes into the page header.

Oh right. I am planning on implementing Stripe in the next several weeks. But haven’t done it before myself.

Depends how you plan to use it. But going off the other thread it looks to me like you would just post the whole snippet code into a code block.

I have stripe working using checkout. It is for a Home Owners website so I have just a single product.

What I did was setup the product on the stripe dashboard (be sure you add the domains you are going to use checkout as well in the dashboard), copied the code snippet into a HTML bric and that is all there is to it…

Also, I would use SSL for the website…

Thanks – that makes sense. I could see how to set up Dashboard but I couldn’t find out how to dovetail it with Blocs. I believe Stripe now demands you use https:// to access its system.

… also do you have a URL so I can take a look, please?

Contained it the document above it has the following:

To use Checkout on your website, you must add a snippet of code that includes the desired SKU or plan ID. You can use the Dashboard to generate the necessary code, or you can write it yourself.
Generate in Dashboard Write it yourself
In the Products section of the Dashboard, select the product that you want to sell. In the product detail view, click the Use with Checkout button next to a SKU or plan to generate a code snippet that you can add to your website.

When you click the “Use with Checkout” you will see the code to add to the Blocs HTML bric, the only other thing I did was to create a success page and cancel page on the website to handle those two actions…

I am not sure of what URL are asking about, but all the code you need you can get from the product page. Again my use was for just one product so it was simple to plug in the code snippet to blocs.

One more thing…I ran into a problem with the check button that was generated lost the pointer setting, so I had to add the following while customizing the “Checkout Button”

<button class="button" style="background-color:#797979;cursor: pointer;color:#FFF;padding:8px 12px;border:0;border-radius:4px;font-size:1em" id="checkout-button-sku_XXXXXXXXXXX" role="link">
  Credit Card Payment
</button>
1 Like

I am looking at this page Prebuilt Checkout page | Stripe Documentation

So what code do I use the

Checkout.html
composer.json
create checkout session.php

Sorry I am still confused. Maybe I am thinking about it to hard.

Hi there,

I use stripe via Ecwid, but I believe stripe is now integrated through Blocs V4. Here’s a video showing that feature:

Oh so maybe it is a bug because strip isn’t working for me.

Hi @1michaelbrown,

Did you put your Stripe Publish Key in your project settings?

Yes I have add it.

1 Like

I am getting server 500 error

I think it needs to be hosted?

so the server error went away but now the button does nothing.

https://demo.1michaelbrown.com/order/

Hey @1michaelbrown

Have you set your Web Address in Project Settings also? This is required.

Without it, the https: is missing from the link, which is required for Stipe to work (hence the page errors you are getting.)

Screen Shot 2021-03-08 at 3.58.08 PM

2 Likes

Thank you so much. sometimes it is small details missed that just drive me crazy. LOL

One more thing with use blocs can I only use CLIENT-ONLY INTEGRATION or can I also use CLIENT & SERVER INTEGRATION

No worries, it only occurred to me later what was causing it. I had a mind freeze.

What do you mean by Client-only and Client & server ?