Updated: 18.10.2024 | Changelog
Keybin WordPress plugin.
We have developed a Keybin WordPress Woocommerce integration plugin that enables selling more than 20 000 products on your Woocommerce shop.
Start selling digital products in a matter of minutes. No programming knowledge is needed! Our plugin is free to use for connection to the Keybin platform.
Plugin features
Import products
Filter imported products depending on price range and platform.
Set margin
Set global margin, fixed margin, or margin by platform.
Update stock and price
Instantly update stock and price with Webhooks
Auto deliver orders
Automatic purchase on Keybin and deliver to the customer.
Codes in email
Send codes to customers via completed order email.
Double-check on checkout
Re-check prices and stock on checkout to avoid failed orders.
Import product info
Images, description, platform, requirements, videos, and more.
Optimized processing
Imports are optimized so they can be run more frequently via cronjob.
Plugin gallery
Keybin guides and things that may come handy when setting your store
About Keybin WooCommerce plugin
Our plugin is open source and you can change code according to your needs to the point that is used to connect the Keybin platform and your WooCoomerce store. We don’t take any responsibility for what could occur during the usage of the plugin and incompatibility with other plugins or themes. You have to take care that your webshop infrastructure is updated and protected from exploits, and hacks and to protect your Keybin Access tokens. Keep in mind that with Keybin Access tokens, anybody can buy under your account out of the Keybin platform and your webshop so it’s strongly recommended that you don’t save it but rather generate a new token and re-enter your webshop.
The plugin should work with all correctly designed themes and plugins that follow WordPress guidelines. The plugin should work out of the box but we strongly advise testing it on a test environment before setting it up on a live website.
If you want to change the functions of the Keybin plugin it’s strongly advised to create a separate plugin or put your new code into the functions.php file of your child theme.
Data provided via API (description, images, videos, platforms,…) is combined from various platforms and the internet. We can’t guarantee provided data it’s right and we strongly suggest checking each product before activating it for the public.
Installing and prepare WordPress
If you already have WordPress installed please skip this step.
We have tested Rabbit Hosting, Digital Ocean, and Hetzner. Basic programming knowledge is required to set up WordPress and cronjobs. Keybin plugin will also run on shared hosting but imports could fail and it could take hours to finish. Keep in mind that sooner or later you will probably need more disk space as the number of products grows, check with the hosting provider that there is the possibility to add disk space.
Rabbit Hosting
We recommend using the VPS package Sleepy Rabbit (10 € / month, the best deal of the three presented here). We have partnered with Rabbit Hosting and you can get all set up and running for a fee of 25 € + TAX. We were also impressed by the support provided by the Rabbit Hosting staff.
Digital Ocean (click here to activate the affiliate link).
We recommend using Digital OceanWordPress 1 Click App droplet (simple setup, 15 – 30 € / month). Digital Ocean is more expensive than Hetzner or Rabbit Hosting but things are much easier to set up and run out of the box. Please use our listed recommended resources or better when creating a WordPress droplet.
Hetzner (click here to activate the affiliate link and get 20 €).
We recommend using Hetzner Cloud CCX13 21 or above with a 2-4 dedicated vCPU (10 – 20 €). Hetzner is cheaper and stronger than Digital Ocean but might require more programming attention in a later stage. You can use Hetzner Apps to simply install WordPress.
Keep in mind that these packages do not include backups but all three offer simple and cheap backup options.
To prepare WordPress for importing products you have to lift some settings in php.ini
Usually, the php.ini file can be found in one of the paths (don’t forget to change the PHP version to the one you are using):
Digital Ocean: nano /etc/php/8.0/apache2/php.ini
Hetzner and Rabbit Hosting: nano /etc/php/8.0/fpm/php.ini
Change to settings:
max_execution_time = 3600
max_input_time = 3600
memory_limit = 2048M
post_max_size = 256M
upload_max_filesize = 256M
If you still get problems importing products (error: memory exhausted) change memory_limit to 3072MB.
Some servers might get Nginx: 413 – Request Entity Too Large Error when uploading plugins.
To fix this open nginx.conf usually located here:
vi /etc/nginx/nginx.conf
and add under http
client_max_body_size 4M;
Save and reload Nginx.
Setup Keybin plugin and cronjobs
Setting up the Keybin CodesWholesale WooCommerce plugin is simple. Before you start setting up the plugin your account must be verified and you have to request API access via email [email protected]
Setup steps
1. Make sure that WooCommerce is installed and setup
2. Download and install the Keybin WooCommerce plugin
3. Navigate to Keybin plugin settings to start the setup
4. Enter your API Access token to connect to the Keybin platform (create a token under your Keybin account settings -> Access Tokens). If you set expire date for the access token keep in mind that you will manually have to generate a new token and re-enter it on your WordPress shop! On the same page, request a Whitelist of your server IP.
5. Check all settings and adjust them according to your needs. You can change settings later but keep in mind that new settings will be used on the next import.
Importing products
When you are happy with the set settings first click the button “Import Platforms” and “Import Regions” and when the process is finished click “Start Import Products”. It’s normal that after a minute or two you will get a timeout error in the new window that opened after you initiated import. You can close this window and check the progress under WooCommerce tab Products where new products will be added. The first import could take a few hours to finish (depending on server resources, usually it will import 100 products per 5-10 minutes). If the import is interrupted and new products are not added, click the Start Import Products button again to continue.
Please don’t change Categories and Attributes names created by import as this will cause that categorization and attributes to import wrong!
If you want to update stock and price click the button “Update Stock and Price”. This could take up to 10 minutes to finish. If a timeout error is thrown you can ignore it.
If you want to complete orders manually please use the button “Complete Orders”. This will trigger a process to buy products on Keybin, pull order products from Keybin and deliver keys to customers and set the status of the orders to Complete.
Above we have described how you can do all imports and orders manually but we strongly advise you to make all those steps automatically via cronjobs. We recommend setting cronjob on your server but alternatively, you could also use something like cron-job.org.
When setting cronjob you can use the URL path or absolute path on your server. Settings cronjobs on your server require programmatic knowledge so if you don’t understand things below please consult this with your hosting provider. Below we will show how to do it via the CURL link that you can use also on solutions like cron-job.org.
First, we need a cronjob to import new products. Before we import new products we need to make sure we also have all platforms in our system. We recommend doing this once per day at night.
Below settings will run at 02:05 (platforms import), 02:15 (region import), and 2:30 (new products import)
5 2 * * * curl https://[inset-your-domain]/wp-content/plugins/keybin/cron/cronforupdateplatforms.php
15 2 * * * curl https://[inset-your-domain]/wp-content/plugins/keybin/cron/cronforupdateregions.php
30 2 * * * curl https://[inset-your-domain]/wp-content/plugins/keybin/cron/cronforproducts.php
Now we need to set up to update Stock and Price. We recommend doing this every hour.
0 * * * * curl https://[inset-your-domain]/wp-content/plugins/keybin/cron/cronforupdateprice.php
We want to deliver and complete orders as quickly as possible so we will run this every 5 minutes.
*/5 * * * * curl https://[inset-your-domain]/wp-content/plugins/keybin/cron/cronfororderkey.php
If you don’t want to run cronjobs from the link you have to define the server path and should look something like this:
*/5 * * * * /usr/bin/php /var/www/[domain-path]/wp-content/plugins/keybin/cron/cronfororderkey.php
You can set timing differently depending on your server resources and how things work best for you.
You can always check if imports were successful on the Keybin plugin page. The system will send an email to the administrator if the import fails.
Testing
After the product import is finished please make test purchases on our test products:
– 11000000300 @ API Test product (Keybin) #1 (text keys)
– 10000048370 @ API Test product (Keybin) #2 (text keys)
– 10000048369 @ API Test product (Keybin) #3 (image keys)
When ordering test products we won’t deduce a balance from your account and orders with test products will have the order status “test”.
Delivering orders
Orders are sent to the Keybin platform only for WooCommerce orders with the status “Processing”. Until the order reaches the status “Processing” no purchase will be made on the Keybin platform. After the WooCommerce order reaches the status “Processing” the system will purchase products on Keybin and deliver bought products to the customer. At the same time, the WooCommerce order status is set to “Complete”. The customer will receive a completed order email with activation codes for the products included. In this way, we can avoid orders being created and sent out if payments fail. So keep in mind that after you receive payment you should set the order status to “Processing” so the order can be delivered and Completed.
We recommend delivering orders via the cronjob that we set up above. If you want to manually deliver orders via a click on the button “Complete orders” you have to uncheck “Autocomplete and deliver orders to customers” in settings. Each time you click on the button “Complete orders” the system will try to buy and deliver all orders. We don’t recommend this solution as price and stock can change and orders will fail. This solution is great for testing or if cronjob fails.
Webhooks – recommended but require more resources
Webhooks are a way for the Keybin platform and your WP store to communicate with each other in real-time. Instead of a user polling a server to check for updates, the server sends data to a specified URL whenever a certain event occurs. This allows instant data updates, making webhooks useful for integrating different services or automating workflows.
Webhooks are very important to have instant updates for stock and price. We recommend turning on two Webhook endpoints: listing_create and listing_update. Other Webhooks endpoints (product_create and product_remove) should be used only by advanced users/developers as they might need more customization to fit the product creation flow.
Please open your WP Keybin plugin -> Settings and follow the on-screen instructions to enable Webhooks.
If you encounter any problems or find bugs please send us an email at [email protected]
Wordpress themes and plugins
If you are searching for WordPress themes, we suggest looking at Themeforest. Before purchasing a theme make sure to check that it’s WooCommerce compatible and that it has regular updates.
If you are searching for plugins you can check the official WordPress plugin page or CodeCanyon where you can get premium WooCommerce and WordPress plugins.
Some plugins that may come in handy:
– WooCommerce reviews
– Back in Stock notifier
– Contact form 7
– Easy WP SMTP
– Email log
– Woo discount rules
– WooCommerce email customizer
– WP Rocket caching
– Yoast SEO
– Automatic translation to other languages
About our recommendations
We make extensive research on the market so we can recommend you best plugins to build your digital shop. As researching and testing plugins take a lot of time we might use affiliate links that help us understand how much interest is generated. Affiliate analytics will help us to understand what should we focus in the future. All profit from affiliate purchases will be donated at end of each year to the charity.
Website hosting
We advise using VPS solutions with recommended server resources:
3 GB RAM
60-80GB SSD
2 CPUs CORE
SSH/cronjob set up access
PHP 7.4 or above
Shared hosting solutions are not advised and should be avoided. You can use any VPS/Cloud solutions that offer recommended or better resources.