Business

APIs Bring Ecommerce to Any Page, Service

Application programming interfaces (APIs) from payment processors and service providers make it possible, if not easy, to bring ecommerce to essentially any page or any service.

Often the first thing that comes to mind when someone thinks about ecommerce is online retailers, such as Amazon. This makes sense. Retail ecommerce certainly earns the lion’s share of revenue and attention. But ecommerce can describe more than paying for physical goods online. Rather, it can describe the trade of virtual goods or services, subscriptions, or even access to travel and events.

It’s similar to someone paying for an online service, such as a subscription to Laracasts, a service that provides PHP and Laravel framework video tutorials to paying members or buying ads on Twitter.

Laracasts provides PHP and Laravel framework tutorial videos for a fee. It is another example of non-retail ecommerce.

Laracasts provides PHP and Laravel framework tutorial videos for a fee. It is another example of non-retail ecommerce.

Ecommerce Entrepreneurs Unbound

Paid online services have been around for a while. But it is good to remember that ecommerce entrepreneurs are not bound to sell physical things, but rather can generate online revenue in many and various ways.

Ecommerce could include:

  • Software as a service, platform as a service, or infrastructure-as-a-service businesses;
  • Paid content, newsletters, or video services;
  • Subscriptions to data services;
  • Licensed software sales;
  • Access to stock photography, sounds, or videos;
  • Paid advertising.

APIs and Ecommerce

Retail ecommerce frequently depends on ecommerce platforms to manage a catalog of products and make the necessary payment connections for selling online. While the very same ecommerce platforms may be employed for the sale of certain downloadable products or even subscriptions to content, many other forms of ecommerce would, perhaps, be encumbered with a relatively large ecommerce platform when a simple API call or two would solve the problem.

Stripe

Take the example of Stripe. Founded in 2011, Stripe is a payment processor built to help web developers add ecommerce capabilities and stay away from the scope of the Payment Card Industry Data Security Standard (PCI DSS). The service is the primary payment processor for Squarespace, Twitter, Salesforce, Kickstarter, Reddit, and Wired.

Stripe is a payment process made to help developers integrate ecommerce into just about any site or service.

Stripe is a payment process made to help developers integrate ecommerce into just about any site or service.

Configured properly, Stipe will use client-side JavaScript to send a customer’s payment information not to your server, but directly to the Stripe server. In this way, the customer’s payment information never enters, if you will, your control, and removes your business from the PCI DSS scope.

Stripe has client libraries for PHP, Python, Ruby, Java, Node.js, Go, and iOS. Community libraries extend Stripe to C#, Clojure, Perl, and even ColdFusion.

Stripe can also be integrated easily via several frameworks. As an example, the service’s API is available as a package (laravel/cashier) for Tayler Otwell’s popular and powerful Laravel PHP framework.

Implementing Stripe with Laravel could hardly be easier. A developer would configure the composer.json file and run composer update.

Configuring the composer.json file amounts to adding a single line. This example is from a functional application running on Laravel 5.0.

Configuring the composer.json file amounts to adding a single line. This example is from a functional application running on Laravel 5.0.

Register the Laravel\Cashier\CashierServiceProvider in Laravel’s app configuration file.

Registering the service provider only requires one line of code.

Registering the service provider only requires one line of code.

Finally, the developer would use PHP artisan to run a migration — anyone who has worked with Laravel likely knows exactly what this is — add a key, and Stripe is ready.

Braintree

Braintree is another payment processing solution with a robust API. Braintree has client-side software development kits (SDKs) for iOS, Android, and JavaScript, and offers server-side SDKs for PHP, Python, Ruby, Java, Node.js, and .NET.

Braintree is another payment process that has made it relatively easy for developers to add ecommerce to apps, service, and websites.

Braintree is another payment process that has made it relatively easy for developers to add ecommerce to apps, service, and websites.

The service also has an interesting “hosted fields” feature available for JavaScript that actually hosts payment related form fields on Braintree’s servers, completely removing your business from PCI DSS scope, even PCI DSS 3.

Braintree's hosted fields feature provide significant protection from PCI DSS.

Braintree’s hosted fields feature provide significant protection from PCI DSS.

PayPal

The venerable PayPal payment service, which will soon be parting ways with Ebay, also has many options for developers who want to add ecommerce functionality to nearly any website or service.

Perhaps the best know service mentioned in this article, PayPal also offers solutions for developers and ecommerce entrepreneurs.

Perhaps the best know service mentioned in this article, PayPal also offers solutions for developers and ecommerce entrepreneurs.

The company has mobile SDKs for iOS and Android. It offers a representational state transfer (REST) API that can be easily accessed via cURL, PHP, Python, Ruby, Java, Node.js, and C#. Finally, PayPal also has what it calls a classic API that makes use of name-value pairs and the simple object access protocol (SOAP).

Possibly more complex than other payment API options, PayPal’s services are just another example of how developers could choose to added ecommerce payments to almost any service or site.

Authorize.Net

A leader in retail ecommerce solutions, Authorize.Net also has a fairly extensive API offering, including specific services for server integration, what Authorize.Net calls “Advanced Integration,” and a relatively newer direct post method, aimed at minimizing PCI DSS scope.

Authorize.net includes fairly extensive APIs for its payment processing services.

Authorize.net includes fairly extensive APIs for its payment processing services.

The company has SDKs for PHP, Ruby, Java, and C#, plus support for Android and iOS with the advanced integration API.

Putting Ecommerce APIs to Use

Stripe, Braintree, PayPal, and Authorize.Net are just four examples of payment services that can help any business monetize just about any content, site, or service. There are many more options — like Venmo or some specialized Bitcoin processors — for accepting all sorts of payments .

The point is simply that ecommerce entrepreneurs have many options for transforming any online business idea into a money-making venture, in part, thanks to easy-to-implement payment-processing APIs.

Armando Roggio
Armando Roggio
Bio   •   RSS Feed


x