The button will sit inside a tweet and allow people to click to buy an item directly from that message.
Tests with a "small percentage of US users" and a limited number of commercial partners are due to begin shortly, it said.
The trials marks a more serious attempt by Twitter to generate revenue by means other than advertising.
Before now, it has been possible to buy via Twitter but this has revolved around users sending public messages with a special hashtag in them to confirm purchase of an item.
By contrast, the buy button would be used alongside messages pushing a particular product or service, said Twitter in a blogpost.
Once users have clicked, they will be prompted to enter payment and shipping details. If a user is already known and registered with a service or merchant, they will be asked to tap the button again to confirm purchase.
Twitter said 19 partners had signed up to the tests, including pop singer Rihanna, non-profit group Nature Conservancy and fashion brand Burberry.
The first items to be sold via the button were likely to be time-limited, such as event tickets or other limited edition goods, said Nathan Hubbard, Twitter's ecommerce boss in an interview with the New York Times.