Categories
Online Marketing

WooCommerce REST API Integration

I won’t bore you with any more details but yeah, I’m the owner of a co-owner, cleaner of a chemical data buzz it’s based in Sydney.

I’ve been working as a software developer for almost 30 years now, which makes me feel very old and somewhat wise and experienced for those who not familiar with WordPress. Sorry, where commerce, just quickly it’s a plugin for WordPress, turns your WordPress site into a ecommerce site. So people can buy often pay for stuff. It’s extremely customizable there’s over hundred extensions for WooCommerce alone.

It was founded in September 2011 and it’s now part of the automatic family. I think something like 28 or 30 percent of all ecommerce sites. These days are running. Were commerce so very popular okay, I wanted to talk a bit about my journey, to how I got to here so talking about the integrating with a WooCommerce API, my company, you work with about five or six. So sorry, we’ve got a couple of stores and about five or six years ago the experience wasn’t great, where people would go to a website.

They’ll click, a big PayPal Buy Now button, take them to the PayPal website, make the payment and then we’d get an email, and we would then have to reply to that email send them a taxi invoice attach the software they’d bought. So it was very sort of labor-intensive manual driven, wasn’t great experience if the customer ordered say after nine o’clock on a Friday night senior time. We probably wouldn’t process that until Monday morning, our time as well so over the weekend, they’ll get very anxious, anxious and think they’re being scammed and cancel their critical tasks, sometimes woody ma they’re bought in a bounce-back because they couldn’t receive attachments that big.

So I was all it wasn’t very great here, and so we knew we needed a better solution. So I started around and quickly found we commerce and it worked really well with that. We’re commerce so within short space of time, I’d created to work on websites, and then we had a great experience. Customers could buy software online pay online, get that downloads automatically and get a taxi invoice automatically.

So we didn’t have to we’d have to do a thing. The missing piece for us was use WordPress or e-commerce store in our business. We use it to run our website now, ecommerce stores we use other software like CRM software, and then we have accounting software and we were to get all those orders out of WooCommerce into our CRM and then into our accounting software as well so beans software developers. We looked at knowing that many of you do that WordPress is built in a MySQL back-end.

We thought, oh, let’s just use SQL to get the data. The trouble with that is, it’s there’s no sort of structure around how an order system would typically work. So there’s no orders table, there’s no line items table, there’s no products and customers table like you’d, normally have there’s things like post and post met or not sort of stuff. So you well. We worked out that you could create a an SQL view to get a nice level representation of how I am an order should look that we wanted.

At least we wanted orders with line items that we could say, and that was working quite well, and so one day it stopped working and overnight we couldn’t connect and it took us about sort of one or two weeks to finally track it down. We will he managed to get in touch with a the right person that our web hosting, who said that yes, they’re turned off remote SQL access overnight and though they didn’t tell anyone.

No, they weren’t going to make any exceptions, and thank you for your call. So we’re in we were stuck. We need a solution pretty quickly because we’re to go back to manually processing orders and that we meant a lot of manual. Double data entry and we’ve got better things to do with our time and then have our staff re-enter data. So once again, I started looking around and realized that uh we Wickham is has an API and looking back well like our company.

We live and breathe API so that we spent so working with api’s and looking back, I’m sort of puzzled as to we didn’t just start with the WooCommerce API in the first place. But that’s how we got here so before we get into the details of the WooCommerce API, just a quick bit about those who aren’t familiar with them. So API stands for mission programming interface, there’s the definition from the great Wikipedia I like thinking of it.

Basically, just as a set of instructions about how to get my software talking with it um your software, some of you might have heard the phrase over the last few years about software is eating the world, and so that is API Zurich in the world API. Where these companies like big and small, have API, so we’re press obviously has an API in the accounting, zealand, zero and my bae have have built big platforms around their api’s Tulio’s, a company you might have heard of in the states they all they have is api’s.

They’ve, build a business on api’s around things like SMS messaging and voice messaging and in the social media. Space companies like Twitter and Facebook also have API, so API is everywhere. Ok, so why would you use the word commerce API? So I sort of alluded to it. A bit for many of our customers, it comes down to one word and that integration, it’s about eliminating double data, entry and hassle saving yourself time.

You might have a inventory system that contains all your products and you need to get that into the online store and you don’t have to have your staff changing your internal system. Then we type in all that into your we’re commerce system that leads to sort of data entry errors when you’re doing things twice like our business. Many of our customers have an internal system that got to get their orders into that as well and ultimately into their accounting system.

They’re, probably also, as you do things you can’t do easily in the WooCommerce admin interface itself, so things like bulk updates. So I can change the price of every product or change the description or change the tag and categories and upload them in one go. It sort of the click of one button. We’ve had a couple customers that also want to do things like send their customers to a payment page, and they don’t want after that.

Basically, they want them to not have to go to. The website find some products build an order or add them to the cart and checkout. They just want to sell them to the checkout page. So the API lets us create an order attached for the lot items, generate the payment page link and then just in the customer straight to their payment page, which seems a bit strange. But let’s sell some customers wrong.

Okay, so the benefits of all this, as I mentioned, it’s about saving time, eliminating double data entry, saving your company money when I wake up in the morning – and we had a few orders overnight – and I know that they’ve automatically found their way into our CRM system And ultimately, into our accounting system, and we have enough to do anything – that’s a that’s a great feeling and then gives us that sort of zen-like state of car I’ve been seeking for many years.

So it’s about taking the stress surfer got much better things to do than be data entry clerks all day. So this is what you can achieve with using the API. So let’s get into the details of the the WooCommerce API itself, so there’s the URL for the documentation. It’s a it’s a it’s a very well documented API in our experience to this week was an exciting week in the WooCommerce API space, because a new version was released with Wickham, as 3.

5 has released version 3 of the API. So there’s currently three versions of the API in WooCommerce version, one was for WooCommerce two version. Two was for Wickham s3 and version. Three just came out for Wii commerce. 3.5. You get all three versions: they’re all installed, they’re all enabled you don’t have to install to anything I mean just get them version 1 and version 2. I was going to be deprecated and removed, possibly at some point.

So any development you do today, you did with version 3. So it’s a what’s called a restful api, let’s just quits to the API using standard HTTP verbs that you’ve probably heard of like get post put and deletes and that allows us to create, read, update and delete information or from outside of commerce to use in the Api there’s code samples for a lot of the popular programming language, he’ll, know PHP path and Ruby, and some SDKs that efficient ones you can download and get going with straight away.

So the first thing you normally need to resolve when you’re working with an API for the first time is authentication. How do I connect to the API purely and safely? No then-known, it’s just me and no one else. So the WooCommerce API gives us two options and that depends on how your site served if it’s served over HTTP so know as a sole certificate. They have this both Wampanoag one legged authentication, which is quite convoluted, and I certainly wouldn’t recommend it and that’s what I’m going to talk about it today, because our story of the opinion that you should be serving your site over HTTPS these days, SSL Certificates, extremely cheap And free in some cases and for me, if you’re using WooCommerce, you’re capturing custom information, so that’s what’s called personally identifiable information, you’re capturing orders and you touch into the payment program processes, credit cards or stuff.

I usually should be using HTTPS and if you’re doing that, then authentication is much simpler with the API. You just need to generate a set of API keys using the WooCommerce seven, which I’ll show bit later and they become you could generate. What’s called a consumer key and a consumer secret and they use own password to the API greenshot of that in the Wickham s API. So you go to the Advanced Settings section on REST.

Api create a new key and you’ll, get a screen like that, and you basically copy that consumer key and consumer secret stored in a safe place and that’s how you what you’ll use to authenticate going forward? Okay, so there’s ups there’s four types of requests I’m going to cover, so they are basically create lease and they will have a sort of quite a similar structure. So let’s talk about the correct request, so this is where you want to add some data to WooCommerce.

So it might be a customer or product or an order or category or tag. So in this case you’re going to do an HTTP POST request to an endpoint so that endpoint is customers, products and so on. So you’re going to include your authentication header, which I’ll show in a second and that’s got your assets. That’s how you’ll indicate so. The WooCommerce API is built around Jason as the data structure so to when you’re sending receiving data.

It’s all in JSON, so you’ll need to be able to sort of encode and decode Jason at that point, and that means you need to include the the content type application, Jason header as well you’ll get a JSON response back if it’s all successful and when you Create something you’ll win the work, I’m a Safeco gives you a response. It includes the the ID they work on this ID and you generally want to sort of capture that and store that somewhere, because, if you ever going to touch that record again through the API, whether it’s updating and getting it or deleting it you’ll need to tell We’re commerce which ID that you want to touch so here’s a some using cool from what all my examples.

That’s example in curl, so you can see. I went yeah wait, use my angles, not great for the laser Benham. You can see you don’t HTTP POST request to the customer’s endpoint. You see the version 3 there. That’s how you know which version of a PO you’re referencing, you’ve got user name and password in it’s the consumer key and secret content, type header and then just the JSON data, so email first name last name and username.

Okay, so, following up from the create request, is the update request? It’s basically a famous the Craig request. You do you put instead of a so API world, creating records to put something about updating records. Why some time? First, in this case, where we were, if into the endpoint, but who also reference the ID at the end of the endpoint so which record was ready, we include the same with a same content of jason header and the same jason as well.

Are the only difference doing an update request is that you only need to if you want to send the changes, the things that you know actually update. So, if you’re updating the status of an order, you could just send the order status. You view uploading email address, you just send the email address. It’s up to you now company. We send everything, because that are that you send for a crater and update.

It can be the same. So it’s just easier for us to sort of recycle the codon and do it that way. Okay! So there’s an example of an update request, very similar to the crate request, except it’s just got the ID on the end of the the URL and I’m just including the data. That’s what’s going to be changed, okay, so they’re the two ways you can send data up to WooCommerce. Now we’re going to talk about downloading data from WooCommerce.

So that’s when you do a get request so get rid of any new URL in your browser. There’s data to send you’re, basically just specifying an endpoint and there’s two types of ways you want to download data. You might want to download a single record or a group of records, so we’ll cover the single record first. So when you’re doing a record like a update request, you need to specify the ID of the record that you want to get and you just build out the URL.

You include the authentication header and that’s it you don’t need to send any choice or anything just create the URL and you’ll get back that record. The full Jason check for that record as well. If you wanted to that’s what the response looks like so you can see the ID and the adjacent data for the particular record you’ve requested. The next type of request is when you want to get more than one, so you might want to get all the products in a particular category.

All the orders from last week were yesterday all the tags or the categories whatever might be. So this is where you’re doing is still doing a get request, but obviously specifying an end point say: orders with no ID and you can now build out the URL of it further by including extra parameters and the concept of pagination. So if you look at my little URL here, you can see I’m saying get me all the orders after that date and before that, don’t and give me page one and order them by ID in ascending order.

So let’s talk a bit about pagination. So when I tell WooCommerce to give me lots of Records a list by default, it just gives me ten it. Obviously, if I attend housing orders in Mike Weir commerce site, I wouldn’t want to get those automatically, because that would sort of flood the connection the API would sort of slow to a crawl. My computer probably slowed to a crawl, its processing. That’s so there’s always limits when you’re getting multiple records, so you get ten by default.

You can override that ten by specifying a value for the per page. If you wanted 20 or 50, you can do that. When you get a group of records, you need to examine, what’s called the response, headers and WooCommerce will tell you how many records are found. How many pages are you’re going to need to use to get all those records and it’ll give you the link for the next page as well? So you don’t have to sort of programmatically work out.

What all that stuff is. If we have a look at an example of their response, headers I’ve highlighted some things in red, so at the top is the response code. So anytime you work with an API. You should always get the response code and see if it was a successful response. So 200 series isn’t only the success series. I’ll talk a bit more about that shortly. You can see here. We’ve got the xwp total, so that means 21 means I’ve found 21 records.

Total pages is 3, so I need to make 3 requests if I’m getting 10 per page to get all 21 records there. Hopefully, is the link to the next page, so no need to work out that I can just go and grab that link header and use that for my next page for what, if I’m sort of looping through getting all these and one request? Ok, so the final request I want to cover is the delete request. Delete request is very slimmer to an update or a get single record.

It’s basically specified an endpoint with the ID of the record that you wish to delete you’re, not sending any JSON data you’re. Basically, just doing an HTTP delete request to the endpoint. The only thing you need to be aware of is not all resources support the concept of thrashing and that’s where you can delete a record and it goes into the trash. It’s not permanently deleted. Some of the endpoints and the documentation tells you this.

You need to include an additional parameter. The force equals true and that permanently deletes the record immediately. So you’ll you’ll never get it back when you delete that type of record. Ok, so I wanted to talk a bit about web hooks as well web hooks for those who are not familiar with. Where book is it’s it’s a way of having a notification sent to your server, essentially when a certain action or trigger event occurs so for WooCommerce.

This might be when a customer’s updated or when a order is created, for example, and that’s a screenshot of the web book set up in the world commerce. That means green. Here’s a example of a workflow from our our company and how we use where books. So we now one of our webstore ecommerce web stores gets a new order. We have a web book far off that to our internal server and that creates that contains all the information for that particular order.

But it’s a new order. It’s not a completed order so that all does not doesn’t have all the information that we need right then. So we we wait. We wait us or a moment in time or a couple of minutes, I think for memory, and then we may get a request to the WooCommerce hope you ought to get the latest version of that order, and that includes all the payment information, which is the main Thing that’s missing from when it was first created and then we pulled that back into our internal CRM.

So we’ve got the latest order. So, a couple of months later and then we fire that off using the Xero API, which is our accounting software that we use so within about five minutes to get an order. It’s in our CRM system, the updated version and it’s in our accounting system and that all happens without us having to lift a finger so where books are great. If you want to automate workflows and not have to go and get data from where comments but have a push, you data automatically, ok, so just some tips on sort of picked up over the years of working with various versions of the API.

So, just worth noting time, stamps are always in that ISO 8601 format. As I mentioned earlier, you should always check the HTTP response code, because you want to know where there was a 200 or 201. That’s the successful response codes. You might make a request to get a customer that doesn’t exist, so you’ll still get a successful response paper. Just it’ll take it in for anything, so you need to sort of differentiate between.

Did I get the data that I wanted and versus did. Myopia was my opinion. I request successful, so 400-series are for the sort of request errors. The invalid jason for our one for unauthorized. You’ve got some problem with your api. Keys 500 is a serve error and so on. If you wanted to upload images, say for a product via the api, we’re commerce only lets you upload images by including the full URL for the image.

So it’s going to ingest it and add it to your product when it downloads it. You can also reference if it’s an existing image in your WordPress media library. You can just tell it what the media, library, IDs and it’ll it’ll just link it to product. If you’re wanting to upload a local file, you need to use something like the WordPress API, which does support uploading local files and then grabbing the media ID and adding that to your upload request.

So we’re commerce has got a standard set of fields for things like products and orders and customers, but it might not have all the fields that your customers need for their particular. So a lot of our customers use custom fields for their store and the the way they do. That is through changing the PHP code or using one of the popular custom field plugins. So it’s just worth mentioning that the custom field data that you get isn’t part of the sort of the call will commerce REST API, but they it’s generally including, what’s called the metadata section or the meta data, that’s attached to a product or attached to an order And I’ll show example that immanent yeah, if any, bugs just report them through the github page, they get fixed really quickly.

My experience of reported about half a dozen over the years and they’ve always been fixed and included in the next release of WooCommerce. If you’re not sure where to start with all of this I’d strongly recommend a tool like postman. That’s a free, HTTP client app that you can download and you can use it to construct these requests edge, authentication, header and just see how it all works and examine their response and the response.

Headers and finally, just a bit on the new features of the WooCommerce version through the API that released a couple of days ago. So every time a new version comes out, there’s no menu, endpoints or updates to existing ones so in. But if you win points, so we get a reviews in point. We get a reports in point, a new data endpoint. You can now refund line items through the API. That’s been a sort of a popular request over the years, and you can now edit some things like date, fields on the products endpoint that previously we’re not went.

Editable are the API and when you looking at the documentation, the oppo will tell you if the field is read-only or not. Okay, so I think that’s into my slides. Let’s crack open some demos, okay, so I’m just going to use just a bit of postman first, so this is postman for those who haven’t seen it it’s a free download. You can use it to construct, HTTP requests and just see everything about it. So here’s a little simple example: I’ve got my URL there for my version, three of the products npointing armed taking the products tag, so I want to create a new tag in this example.

So putting my authentication username password, my consumer key and consumer secret and postman does a great job in it generates the authentication header automatically I’ve added in my content, type application, Jason header, so I’m basically ready to go so now. It’s Jason that I’m sending. So I just need to choose the Jason body type and construct some JSON, so I want to create a new tag for my product.

Called products called cake ingredients. I’r just going to click. Send it’s going to request I’m using my little phone here for the Internet. So yes, that worked and it’s come back with a response, so you can see that was successful, there’s my ID, so I could now store that ID number 96 in my particular system, whatever I’m using, and it feels to rename that in the future I can do An update, request and say update ID number 96 and all updated for me.

If you want to look at the headers that come back, you’ll see them here. This was just a create request, so we don’t get the the titles and all that sort stuff with that. So you go to sort of examine the response. Headers that you get back. Let’s look at creating a customer. Now here’s a oops, a customer, oops. Okay. So once again I’m doing a a post, and these are where you choose the different HTTP verbs.

You want to play with so I’m going to do a post to the customers in point. Here’s on my customer data, so let’s just hit Send and that should work okay. So in this case I’ve got an error, and this is how you can tilt you’ve got. I also got a stairs code of 401, so 401 means an authorized, so I’ve also got some problem with my API keys and if you work on, as you know, me gives you a sort of generally a helpful message and you can examine the headers and that Might also tell you a bit more information about what they were always but I’m sort of know from experience to the Foro ones and authorizer.

I will need to go and fix my consumer key and consumer secret okay, so that I can check for an error now. I forgot to actually show you how to create these keys. Let’s jump over to the wordpress. We commerce admin screen. So here I am I’ve just gone to WooCommerce. I’ve gone to settings, advanced REST API and you just click, Add key to create a new key and you’d. Give it a name. Now you choose the user to associate that key with so the sort of the privileges and then you choose.

Is it read, write or or read and write and then, when you generate the key it’ll come back with the consumer key and consumer secret? So at this point you need to copy and paste those and store there somewhere. Secure you’ll, never see these again. At this point, so if you don’t make a note of them, you’ve got to go, go and create another one again, so actually note those down otherwise you’ll need to start again.

Web hooks are also in the same Advanced Settings section. So if you wanted to create in your web hook, you’re just come in here and go add a web hook. Do that again, and yet once again, you’d give it a name and the important thing is choosing the topic or what’s the trigger or what’s the you want, this web hook to fire on? So these are the the predefined options that we commerce gives us so generates about when something was created or updated.

So I that’s the order. Credit Amun, that’s the one that we use in our business, but you also get some other ones around products as well. Okay, so let’s switch over to FileMaker, so we do a lot of work, as was mentioned earlier, I’m in the FileMaker platform. It’s a popular platform, small businesses, it’s Apple and it’s great. It runs on to the Mac Windows my on the web, and you can use it to integrate with lots of API, so we use a to integrate with that we’re comments in particular, so I might want to download all my orders for the month of October.

For example, so here I’m doing a requested on filtering by date range and I’ll click that button say get me all the orders between those two dates. So it’s getting me a list, so I’m getting 10 at a time and it’s just sort of working his way through them. It’s happening over my mobile phone, so it might be a tiny bit slow and yeah. So this was my internal system of now got all my orders in here. I can then go and modify them print.

Shipping labels and anything else I want, might want to do my sort of CRM system and then I can send them emails and send it off to my accounting system as well. I think that was all I had for my demo, so we just switch back to my slides, yeah. Okay, so there’s my contact details so I’ll be around for a couple of days. If you have any questions, but now know what it’s like to open up for questions,


 

Categories
Online Marketing

WooCommerce Checkout Settings – Tutorial PayPal, Cash on Delivery – eCommerce Payment Options

Whatever is count they want, so they can get that find some. If you want that – or you can enable this thing and in this lectures itself we’ll see both these checkout options and coupon options now here is the checkout process.

If you want to enable the guest checkout make sure it is enabled – and I highly recommend this – which this is very important – and now we have – you – have to really just recheck whether everything is fine, cart, page should be selected to cut checkout page should be checkout Terms and conditions, if you want you, can create a page. You know terms and conditions right right, just type in your terms and conditions which you have, and you can link your page from you if you want not not necessary the not necessary, but if you want you can do that and after you’re done all this changes.

Just click on Save Changes now before proceeding to different checkout options. Now, let’s first see the coupon code, so just click on coupon from here. Ok now we have to add a coupon, because we don’t have any coupon codes right now so right at top. As you can see this in button, it says at coupon just click on that. Now you have to put in the coupon code right up here. For example, suppose you want to offer 25 % off then you can select.

You know 25 of this kind of coupon code you can make and in description you can write the description about this coupon code get 25 % off on the total amount. Okay. Now here we have to do some settings discount type percentage, discount or fixed card discount, what kind of discount it is. So this is percentage discount because we are giving 25 % off now the coupon amount you have to select the coupon amount.

Okay, so we are selecting 25 %, allow free shipping – if you want, you can check this, and you can also set an expiry date. For example, 31st of this month we can set that expiry date, usage restriction, minimum speed, maximums minimum spend maximum spend, but the minimum. How much amount should be there there so that the user can get that 25 percent off so suppose I say minimum you have to purchase for $ 100 only then he is eligible for that 25 percent off and maximum thousand dollars so that a maximum only up To $ 1,000, he can get 25 percent off.

Okay, individual use only check this box if the coupon cannot be used in conjunction with other coupons, and this is highly recommended, because we don’t want a user to use 25 percent coupon and then again we have another coupon code which gives third year 30 percent coupon. Then what happens is he he ultimately will get 55 percent off on the product which may incur some loss for you so make sure this is selected so that he can, you know, just use any one of these.

Coupon codes exclude sale items, yes make sure it is that why? Because you know, sometimes you are offering products on sale, 10 %, 20 %, 30 % – and on top of that, if someone uses a coupon code, then again the same thing happens: 30 percent sales plus 30 percent coupon code. He gets a 60 percent off for the product. Now you can select products. Suppose you want only this coupon code eligible only for some specific product, then you can type in the name of the product and that product will appear over here and you can see that product.

But because we haven’t created any product, then we won’t get any option or you can exclude some products. For example, suppose you are, you know dealing in jewelry or some kind of product some expensive products. Then obviously you will be a super fool to give 25 % off on those kind of products, so you can exclude those products just type in the name of the product that product will appear or you and you have to select that product.

You can select the categories for which you want to offer the this coupon code this discount, and you can exclude some categories also, and you can exclude some emails, also, no restriction or email restriction. Whatever you want usage limit usage limit per coupon, you can set to 1 means our user can use this coupon code only once ok, now it says, use your limit usage 2x items. How many items can this coupon code be used on so suppose you said 2 items then if he purchases 2 items, then he can get that discount limit use limit usage limit per users.

Obviously it should be one that is only one time that coupon code here could be used by a single user. So once you you are done with all the settings, you can just click on publish okay. Now, when we come to the cart page in the demo website here this is the option for coupon code and now, when the user puts in B that coupon code, 25 % of and click on the apply coupon, the rate will decrease or your okay.

So this is also very important. You know it helps you in marketing your product in marketing your website. So this is very important according to me now again coming back to the checkout options, so under WooCommerce select settings and under settings select checkout. Now suppose you want to accept bank account transfer, then you can select this options be ACS. This is obviously not preferable by me.

I don’t recommend this because when will the user, our transfer account amount in your bank account and when will you come to know? But still, if you want this option, you can just click on L and just put in your bank account in account number bank name. Ifs C code in this kind of stuff – I don’t recommend this one, but if you still want this, you can enable this. Then you have check payments again.

This is not recommended cash on delivery. If you want to enable cash on delivery, then you can just enable cash on delivery. Okay, just click on Save Changes. Ok, now the final option: the PayPal option, just click on PayPal; first click on enable PayPal standard. Then you can select the title PayPal. Then there is a description pay via PayPal. You can also change this title and description. Paypal, email make sure this is very, very important.

You know this is your paypal email, the email address on which the PayPal account is activated. So, whenever some user purchases some product and transfers that money, then that money will come to this email address, ok leave these options. These are not important. Receiver, email address make sure the email address is correct. Very very important now is other three options which are very important.

Okay. Now, let me tell you: where will you get all this API username, password and signature for that open PayPal in a new tab log in to your PayPal, account scroll down and at the left side you’ll see seller preferences in under selling tools, just click on seller Preferences, a new page will pop up and you’ll get so many different options, as you can see right up here here, it is an option called API access.

Okay, here it is API access and beside that there is all buttons. So, besides the API access this and update button, just click on that now here there are two options: first, one is to add or edit API permission and the second one is to you know view the API signature. Now what you have to do is click on view, API signature. Now here you have to confirm that you’re, the PayPal account owner. So you have two options: whether you want to receive an email address or an automated phone call on your registered mobile number.

So I am selecting the receive. An email address, select the mobile number. This is the mobile number. Now click on continue! Oh, yes! So once you confirm your account number, you will get three options right of your API, username, password and signature. You can just click on show. You will get your username just copy it from your go back to your dashboard paste it similarly copy and paste your password and signature over here.

Okay, so click on partial password copied place to do your signature copy and pasted over here. Now, click on Save Changes. So with this we have completed the checkout option and in the next lecture we’ll be creating new products. I’ll show you how to create different car products, simple product variable, perhaps sale, product and different other products, so see you guys in the next lecture.


 

Categories
Online Marketing

How to Accept Credit Cards on Website – Stripe Payment Gateway Setup WooCommerce WordPress Websites

Now I have two thoughts. You have to create an e-commerce website now this in this article I’ll show you how you can accept the payment on your own website, because if earlier we were using PayPal in PayPal, what happens is when the user or the customer wants to make payment? They have to go to PayPal to make the payment, but today I’ll show you how you can accept payment on your own website.

Okay, so the user can make payment through credit card or debit card on your own website. They don’t have to go to some third party website. First, let’s understand the difference and let’s use this website as a demo. App. Sorry, if you don’t know how to create this ecommerce website, if you are interested in how to create a ecommerce website from scratch you very easily, then there is a link given in the article description below you can follow that link.

I have thought you know in detail, for, for there is a four hour long tutorial you can read that tutorial. You’ll learn everything from scratch: how to create an e-commerce website. Okay, now let me go to the shop page. So, let’s add some product in our card. For example, suppose you want to add this thing this helmet? How are this and click on Add to Cart now, as you can see, we have something in add in our cart.

So let’s click on View cart. So this is the product in our cart. Now, if you want to make payment, what do you do? You click on proceed to checkout and we have this PayPal option over here. So now, let’s see this is the website on which we are nitro, dot, Nisha, calm, and when we want to make payment through PayPal, we select PayPal. We click on proceed to PayPal. Now, as you can see, it has redirected me to paypal.

Com not on my website. Even if I want to make payment through credit card or debit card, I will have to use PayPal. Ok, now I don’t say: PayPal is bad or something like that. Paypal is really really amazing. I personally use it, but the thing is now: oh, this thing doesn’t work. Ok, if you’re creating our e-commerce website, you should you have some better option. That is what I am showing you today.

Ok now, this is what happens when you use PayPal. Now, let’s come back, let’s come back again now, instead of PayPal, you can use stripe okay. Now, when you use stripe, as you can see, if we have the credit card details over here, the user can put in that credit card or debit card details over here. Okay, this is just demo card. Okay, so don’t use this card and they can put all this information over here and click on place order.

Okay, it is taking some time, it is analyzing it. As you can see. Thank you. Your order has been received, so we, the user or the you have already received an order. Okay, the the customer didn’t have to go to some third party website to make the payment now today I’ll show you how you can set up this thing so to do so. Come back to your dashboard now to use this thing first, we need a plug-in called stripe.

So, from the left hand side you will see this plugins how our plugins and click on add new. Now, in the search plug-in the stripe in stripe as STR IPE now, when you do, when you do so, you get many different plugins called stripe. Now the one which you have to install is this one: Moo commerce, stripe payment gateway by mu commerce. Ok, it has got around 300,000 active installs, so this is the one that you have to install so here, you’ll get one button like this install now.

Click on that Install Now button then activate this plug-in. Okay, once you activate this plug-in from the left hand, side how our commerce and click on settings now click on checkout. Now you should see one more option over here called stripe like this one. Here we have stripe. Click on stripe now make sure you take mark this enable stripe and in the title we have credit card or stripe. Now we don’t want this title.

We will just use credit card or debit card. Ok, ok, pay with your credit card wire stripe. So again, we don’t need good, while stripe just type in pay with your credit card or debit card. Now I have enabled test mode because I don’t want to make any real payment. So if you, let me show you how to set this thing. First, go to strike calm and make a free account. It is really easy and very simple to create an account.

I have already done that. As you can see, I have made one hundred and fifty dollars sale. This is obviously test sale. So what I’ll do now? I will go to developers and under developers you have API keys. Now, I’m at present. As I said you I’m using the test mode, I’m not using the live mode. That’s why I am getting this thing over here. So when I click on this, I have publishable key and secret key so copy.

This publishable key from here come back to your website and paste it over here, after that, we have secret key copied from here and paste it over here. Okay, now, after that, I don’t have to do anything, just click on Save Changes and once your website is life, make sure you first activate your account. Okay, how you do that, however, this and click on this link, which says activate to your account and follow the process? Okay, this is only for you know when you are in the production stages and you still want to check whether everything is working, fine or not, but when your website is live, first, activate your account.

I am doing this because I don’t want to make any real payment. Okay, I just want to show you guys so once you do so, you will have this option. Let’s come back, okay, okay, we don’t have anything because we have made a successful payment. Let’s try again, let’s try this. Let’s add this thing to cart. Let’s add this product as well, so we have two products in our cart. Let’s cut this thing when I hover this, as you can see, we have two products.

Let’s click on checkout now, as you can see, it doesn’t say stripe. Now it is saying credit card or debit card. Now we can just enter your debit card details. In fact, this is just a demo card number. You can use this card number. 4. 4. 4. All this for 2 and after that, you can put any month expiry date any month and any year and any CVC number and click on place order. Ok, the order amount was 2834, as you can see over here.

As you can see the total among 2834 pumps, the order is made. We have all these details over here now when you come back to this website and go to your home page. As you can see, my balance has now gone to $ 4,000 and I can see that we have made six successful payments and if you want to see this thing in detail, you can click on developers and click on events. Now you can see the successful payment was made for two thousand eight hundred and thirty four dollars.

Okay, so this is how we accept debit card and credit card payment on your website. I hope this short tutorial was helpful for you guys if it was helpful, then make sure you subscribe to my blog and also click on that Pelican, so that you don’t miss any future articles. If you have any doubt any queries, any questions for me leave them in the comment section below thanks a lot for reading guys see you soon.