How to Use Plugin Builder?
Plugin Builder
About API2Cart Plugins
The API2Cart plugins are intended to make it easier to add stores based on open-source shopping carts like Magento, WooCommerce, PrestaShop. They automatically install a connection bridge to the root folder of the store thus excluding the inconveniences that the process usually entails.
In particular, using the plugin resolves a couple of issues for both software vendors and their clients:
- Vendors do not need to ask store owners for their FTP credentials.
- Store owners avoid the inconvenience of begrudgingly sharing their access information.
- The security of the FTP credentials remains absolute as they do not leave the private admin surrounding the store.
- Either the vendor or the store owner does not have to grope for the right folder to insert the bridge.
How the API2Cart plugins work
- A store owner installs the plugin.
- They press Connect and the system automatically generates a store key.
- The store owner passes the key to the software vendor.
- The vendor system identifies the user account and sends an account.cart.add API call to API2Cart.
- The store is connected.
You can build your own plugins and automate the process of connecting stores using the Plugin Builder
Plugin installation guides
Installing API2Cart plugins on your customers’ stores is easy as 1-2-3. These video guides show few simple steps store owners do to get the plugin installed.
PrestaShop Plugin Installation
OpenCart Plugin Installation
WooCommerce Plugin Installation
Magento 1 Plugin Installation
WooCommerce plugin for Webhooks for Basket Updates
This plugin was developed for API2Cart users to improve integration with WooCommerce.
WooCommerce shopping cart doesn’t provide the ability to get webhook notifications for basket updates, and API2Cart developed this functionality itself.
With this plugin, you can get webhook notifications for shopping cart updates, for example when the new item is added or deleted.
N.B. This plugin works only if WooCommerce plugin is installed and active.
About Plugin Builder
The Plugin Builder allows you to build the Bridge Connector plugin, which is used to connect the store to API2Cart, for different shopping platforms. The following platforms are currently supported:
- Magento 2
- Opencart 2.x - 4.x
- PrestaShop
- Shopware 6
- WooCommerce
If the “Plugin builder” feature is available in the account plan, the plugin can be customized to your needs, for example, you can specify the plugin's name, company, description, and logo. Also, you can enable or disable encryption on the bridge, configure the callback URL, etc. When this feature is unavailable in the plan, the values for the plugin are set by default.
Also, the possibility of asymmetric data encryption has been added to the Plugin Builder. Data is encrypted using the OAEP (Optimal Asymmetric Encryption Padding) protocol, which provides a reliable level of security and resistance to attacks. More details.
Callback URL and Public Key allow you to generate a plugin. After installing it and clicking the “Connect” button, a webhook will be sent to the URL that was specified in the Callback URL field with encrypted store credentials that can be used when adding it to APICart. Namely: store_url, store_key, store_root, bridge_url. Data is encrypted with an RSA key. You can insert your own public key or generate a pair of 2048-bit keys.
The data sent to the callback is encrypted according to the following principle:
- Encoding the data array into a JSON string
- Division of the received string into parts of one length (depending on the length of the generated key)
- Encoding the parts with the public key
- Combining the encoded parts into one string and converting it to base64 format
- Sending the base64-encoded string to the callback
The callback will receive a webhook with encrypted data in the "data" field.
The x-webhook-cart-id and x-webhook-timestamp headers are also available.
To decrypt the data, you need to perform actions with the received data in the reverse direction:
- Decode from base64
- Division of the string into equal parts (depending on the key length)
- Decrypt the received parts using the private key
- Combine the obtained decrypted parts into a single JSON string
Here's an example of PHP code:
As a result, you will receive data that can be used in the account.cart.add method to add a store.
Some fields in the Pplugin Builder are validated, and an error will be displayed if incorrect data is entered. Also, next to each field is a hint with a brief description of what this field is for.
After successfully building the plugin, the downloaded archive with the plugin can be installed on the page of the selected platform.
SEE API2CART IN ACTION!
Book Your Demo Today & Get an Extra 7 Days Added to Your Free Trial!
Discover how API2Cart can ease your eCommerce integrations with a personalized demo. See how seamlessly our solution can connect your software with over 40 eCommerce platforms.
Don't miss out! This is an exclusive one-time offer. Secure your additional trial period by booking your demo now.