Refactored API to have RESTful getPaymentStatus and sendInvoice functions.