The online money order business is a volatile industry. There are a few websites offering online money orders, but most of them are in other countries beside the U.S., and both you and the recipient must be in the country in order to use these services. Other companies advertise online money orders, but actually offer money transfers, which are not the same thing, though they can accomplish the same purpose.
During a money transfer, the sender sends money online using his bank account or credit or debit card to a recipient's bank account, mobile wallet or to a nearby agent. For instance, if you're transferring the money via Western Union, the recipient could pick it up at a Western Union agent (located at many grocery stores, convenience stores, etc.), or get it sent to their mobile wallet or bank account. This transaction can be done online. The fees for the money transfer depend on the amount of the transfer, as well as which country it's going to.
But if you wanted to purchase a money order, Western Union would require you to go in person to an agent and buy it. You could then give or mail the money order to the recipient. The cost of a money order via Western Union is around $1.50 for up to $1,000. In general, buying a money order is cheaper than doing a money transfer online. Be aware that using a credit card to buy a money order or do a money transfer can result in high fees, because it's treated as a cash advance. Some places don't even accept credit card payments for money orders.
Money Gram works in a similar way to Western Union: Transaction fees for online purchases vary depending on where the money is going, the amount sent and whether the person is picking it up or it's being sent to their mobile wallet.
Walmart will also cash a Money Gram money order. Many banks will sell a money order which you need to purchase in person. The cost is around $5. You could also use an app like Xoom to send money, but you would need to use a bank account, credit or debit card in order to do this.