A resource-oriented architecture focuses on nouns rather than verbs (against remote method invocation and service-oriented architecture). Accepting a hint at Donald Fellows' response, RMI's idea is to "pay for the product"; RESTful's idea is to create a transaction. This is a “transaction” in the sense of buying something in a store, but it is related to the type of database transaction.
You can also think of the familiar “shopping basket” as a RESTful resource, and the product itself is a RESTful resource. It is perfectly normal for RESTful resources to "do something", for example:
POST /cart/{id of cart}/acceptproduct/{id of product}
Although you can do something like this:
GET /cart/{id of cart}
(add products to cart view)
PUT /cart/{id of cart}
A user account is another RESTful resource to which you can publish payments. (Pun intended.)
source share