News Archive
PhpRiot Newsletter
Your Email Address:

More information

Simplifying Commerce for Small Business

Note: This article was originally published at Planet PHP on 18 December 2011.
Planet PHP

Selling has never been easy. There's too much red tape. The simple act of you giving me currency in exchange for a good or service I provide is not so simple when you factor in sales tax, VAT, inventory, shipping, reporting income, and any number of other factors that require accounting and fulfillment to be a damned nightmarea-aand that's just when you give me paper money! When dealing with online transactions and credit cards, it can be downright gruesome.

The early days of commerce on the Web were difficult, to say the least. If you wanted a comprehensive solution for your business, you needed a merchant account specifically for online transactions, and you needed to process transactions through a gateway that could connect to your merchant account. On top of that, you'd have to estimate sales tax and shipping rates, and handle fulfillment and inventory on your own.

Solutions are easier now for small businesses and the developers who work with them. Simple APIs exist for use at affordable rates to handle transaction processing, sales tax calculation, and fulfillment.


In the early days of the Web, if you rolled your own cart, you likely used services like Authorize.Net and VeriSign PayFlow Pro (now PayPal). For developers, these weren't easy to integrate with. For small businesses, the online merchant account was a headache, and SSL certificates were expensive, so many opted to redirect their carts to a third party, where the transaction would take place and then redirect back to the business's site. This did not provide a very good user experience.

Stripe is a new service aimed at developers and focused on simplifying transactions and integrations, allowing you to focus on user experience. They have a simple API and do not require a merchant account or gateway. In a sense, they are the gateway. They provide all the features you'd expect, including storing credit card data, offering the ability to set up subscription payments, and paying out directly to your bank account, but there's no hassle. You simply accept the data from your own forms and send it to them over SSL. (You still need your own SSL certificate, but those are much cheaper these days.)


Many businesses choose to avoid the hassle of calculating sales tax on the front end, and bake it into the cost of the good or service, but this means there's hassle on the accounting side at the end of the year. Your accountant must then determine where you have nexus (a fancy term for regions where you are required to collect sales tax), examine the shipping address of everyone who bought from you to see if they need to calculate sales tax, and, if needed, calculate the sales tax for that jurisdictiona-aor guess at it and (hopefully) overpay.

SpeedTax (recently acquired by CCH) provides a service with an easy-to-use API to reduce and eliminate this hassle. You can set up your SKUs within the SpeedTax system and categorize them so that SpeedTax will know how to calculate the sales tax according to each jurisdiction's laws. Then, you specify where you have nexus. When you send a request to the SpeedTax API, you include the SKU and the shipping address of the customer. SpeedTax takes care of the rest and gives you back the appropriate sales tax that you should collect for that jurisdiction.


Fulfillment includes three different processes, none of which are easy for a small business to perform alone. The first is calculating shipping fees. This can be done online, but you have to make decisions about which provider to use (USPS, UPS, FedEx, DHL, &c.) and integrate with their API (APIs if you choose multiple providers). The second is determining whether you have the inventory required to fulfill the order. The third is actually picking, packing, and shipping the product. Most small businesses do this on their own at first, but if you want to scale your business, you'll need to outsource this, so you can focus on running your business instead of shipping your product.

Shipwire provides all three of these services. Their APIs calculate shipping rates for a variety of vendors (which you can provide to your users as options), and you can store inventory within their global warehouses, so you can query their APIs to determine whether you can actually fulfill an order, based on inventory available. Furthermore, since you store your product in Shipwire's warehouses, they will pick, pack, and ship your product based on API calls you make to their system.

Truncated by Planet PHP, read more at the original (another 3090 bytes)