That being said, Electrum offers JSONRPC and you can easily integrate that with your code. There's some examples here[1].
That's accepting bitcoin, however what I want is to send bitcoin to users.
you can do both with Electrum JSONRPC. the commands support both creation and signing of transactions from your keys with commands such as "signtransaction()" and then you can broadcast them using "broadcast(tx)".
Is there any examples/documentations for this? Electrum's documentation doesn't seem to have the info.
You would need to use a series of
RPC commands, such as listunspent and signtransaction. You would also need to craft a transaction outside of electrum if you were automating sending transactions.
If you absolutely do not wish to use a full node, you can also use the blockchain.com
wallet API. Blockchain.com/info does have a history of screwups that has resulted in the loss of customer money, but I believe this to be less common in recent years.
I do believe running a full node and using the
sendtoaddress RPC command would probably be your best solution. The cost to run a fully validating full node is not extraordinary.