What are you delivering? A physical product into someone's hands? If so, a patent can make some sense. If not, don't bother - patents for software are rarely worth the paper they're printed on.
If you're in the US, look into relevant court cases[0][1][2]. The courts tend to hold that algorithms are not patentable - what is patentable would be an invented machine which uses a software algorithm as one of its components. But even then, the machine needs to have some other inventive, patentable physical component.
(This sort of thing tend to confuse people since, the US patent office doesn't check for patent validity before granting patents. So there are a lot of companies that own invalid patents which have simply never been challenged in court.)
If you live elsewhere you should look into the laws of your local jurisdiction, but many places have the same or similar legal doctrine.