After the native ad, here comes the buy button.

On Wednesday, both Facebook and Twitter made critical moves in their efforts to transform their platforms into formidable spaces for online commerce.

On the morning of 17th July, Facebook unveiled a new test click-to-purchase product. Members on desktop computers or mobile devices will be able to click a “buy” button to make purchases through advertisements or other posts on the site, the Menlo Park, Calif.-based company said in a blog post. The service is being tested with a few small and medium-sized businesses in the U.S.

By the afternoon of the same day, Twitter had its own commerce news to share.

The company said it planned to acquire CardSpring, a San Francisco-based startup that allows developers to write applications for credit cards, discount coupons and other payment systems. Its platform is aimed at linking e-commerce with brick-and-mortar sales. Online shoppers can collect sales offers, synch them with their credit card and then collect them at stores. For Twitter, the company offers an existing payments infrastructure that is not built solely around impulse purchases.

The news of the intended acquisition, announced in a blog post, marks one of the first public statements from Twitter about its nascent commerce plans.

Marketers and analysts have widely expected that both social-media companies would venture into e-commerce offerings to boost revenue, moves that pit them against the major credit card companies as well as Apple and Google. With CardSpring, Twitter is demonstrating that it is a serious contender with Facebook, said Tim Dunn, director of strategy and mobile at digital agency Isobar. “Twitter is really being much more aggressive in commerce,” he says.

Facebook's new 'Buy' button.

Facebook, which has more than 1.2 billion users, has tried enabling purchases on its social network in the past, with limited success. Facebook Credits, a virtual currency that let users make purchases within games, was abandoned in 2012.

Twitter last year hired Ticketmaster executive Nathan Hubbard to explore ways to let people purchase goods directly from Tweets. Dick Costolo, chief executive office at Twitter says, that the effort would lead to “commerce in the moment.” The San Francisco-based company also recently signed a deal with Amazon, the largest online retailer, to let Twitter members shop by hashtag.

The company also has commerce ties with Starbucks and American Express.

In a blog post, Hubbard described CardSpring as “a great fit with our philosophy regarding the best ways to bring in-the-moment commerce experiences to our users.” CardSpring’s staff of fourteen employees will be joining Twitter.

With additional contributions from Bloomberg News.