Exhibit 10.40

CONSULTING AGREEMENT

July 28, 2025

Aman Haq, Manager

Stochastic Solutions, LLC

Email: auh@tuta.io

Dear Aman:

This Master Consulting Services Agreement (the “Agreement”) is made effective the 15th day of July, 2025 (the “Agreement Date”) between CareCloud, Inc. and its affiliates having its principal place of business located at 7 Clyde Road, Somerset, New Jersey 08873 (“CareCloud”), and Stochastic Solutions, LLC (“Consultant”) located at 8 The Green Suite B, Dover, Deleware19901. The parties may individually be referred to as a “Party” and collectively as the “Parties”.

1. Services: Compensation. Consultant will use Consultant’s best efforts to carry out the Services described in Exhibit A attached hereto (“Services”). Consultant will perform the Services within the period of time set forth in Section 4 (Term) of this Agreement. In consideration of Consultant’s Services, CareCloud will pay Consultant in accordance with Exhibit A (“Payments”).

2. Taxes. Payments to Consultant for Services rendered will be made without deduction for taxes of any kind. Consultant will be solely responsible for paying any state, country, province, and local taxes that may be due as a result of CareCloud’s compensation to Consultant under this Agreement.

3. Relationship with CareCloud. Consultant is undertaking the Services as an independent contractor and not as an employee, agent, or partner of CareCloud. As such, Consultant will not participate in any CareCloud employee benefit plans or receive any other compensation beyond that provided for in Exhibit A. Consultant will not have the power or authority to bind CareCloud or to make any commitment or contract on behalf of CareCloud, and Consultant will not represent to any person or entity that Consultant has any such power or authority.

4. Term and Termination. (a) This Consulting Agreement will be effective as of July 15th , 2025 (the “Effective Date”) or such other date as mutually agreed upon in writing by the parties, and shall continue in effect on a month-to-month basis until either party terminates the agreement as noted in this section under (b) and (c); (b) Either Party will have the right to terminate this Agreement, without cause, at any time upon written notice to the other Party. Upon receipt of such notice of termination, Consultant will discontinue any further Services hereunder, unless otherwise agreed upon by Consultant and CareCloud. In such case, CareCloud will make Payments for Services as specified in the attached Exhibits until the time of termination; (c) CareCloud will have the right to terminate immediately this Agreement for non-performance on Consultant’s part upon written notice. In such case, CareCloud will incur no liability for Services not performed in accordance with the criteria set forth in this Agreement, including Exhibits thereto; and (d) This Agreement will terminate automatically upon Consultant’s owner’s death, or in the event Consultant’s owner become disabled and such disability substantially impairs Consultant’s ability to carry out Consultant’s obligations hereunder. In such case, CareCloud’s obligation to pay shall cease and this Agreement shall be null and void after the date of termination.

CONSULTING AGREEMENT

5. No Conflicting Services. It is understood that, in general, Consultant may make Consultant’s Services available to others simultaneously and that Consultant is free to accept or reject any further assignment that CareCloud may offer Consultant. Notwithstanding the foregoing, Consultant will not use CareCloud’s Confidential Information for such other services. Consultant will ensure that the Services performed under this Agreement in no way conflict with any other agreement, commitment, or undertaking Consultant may have entered into.

6. Confidentiality. For purposes of this Agreement, “Confidential Information” shall mean any information that is not publicly available and is contained in any form, which relates to the business of CareCloud, its affiliates, parent company, clients or clients’ patients and shall include (but shall not be limited to) information encompassed in all computer programs, source code, object code, user guides or manuals, drawings, designs, programs, plans, formulas, proposals, marketing and sales plans, financial information, costs, pricing information, customer information, information regarding agreements, patient information, protected health information and all methods, concepts or ideas in or reasonably related to the business of CareCloud, its affiliates, and clients. Unless explicitly authorized to do so by CareCloud, Consultant agrees not to directly or indirectly use any Confidential Information for Consultant’s benefit or purposes, nor disclose the same to others, during the period commencing on the Commencement Date extending for a period of one (1) year from the termination of this consulting relationship with CareCloud and such period shall extend longer if required by controlling law (i.e., HIPAA). Consultant agrees to comply with CareCloud’s instructions, and all legal obligations Consultant may have now or hereafter respecting the Confidential Information. In the event that Consultant, or anyone to whom Consultant discloses Confidential Information in accordance with the terms hereof, becomes legally compelled to disclose any of the Confidential Information, Consultant shall provide CareCloud with prompt written notice so that CareCloud may seek a protective order or other appropriate remedy and/or waive compliance with the provisions of this Agreement. In the event that such protective order or other remedy is not obtained, or that CareCloud waives compliance with the provisions of this Agreement, Consultant will furnish only that portion of the Confidential Information, which Consultant is legally required to disclose and will exercise their best efforts to obtain reliable assurance that confidential treatment will be accorded the Confidential Information. Parties agree that this provision shall survive termination the consulting relationship and this Agreement.

7 Clyde Road, Suite 201, Somerset, NJ 08873 | www.carecloud.com | Page | 2

CONSULTING AGREEMENT

7. Publications. Consultant shall obtain CareCloud’s prior written approval for any presentation or publication relating to this Agreement and the Services hereunder or to information disclosed to Consultant by CareCloud in connection herewith, both as to content and time, publication, or presentation. CareCloud, in its sole discretion, reserves the right to withhold or deny such approval.

8. Work Made for Hire. Any work performed by consultant under this Agreement should be considered a “Work Made for Hire,” as the phrase is defined by the Copyright Act of 1976, and shall be owned by and for the express benefit of CareCloud, and/or its parent, subsidiaries, and affiliates. In the event it should be established that such work does not qualify as a Work Made for Hire, Consultant agrees to and does hereby assign to CareCloud, and/or the parent, subsidiaries, and affiliates, all of his rights, title, and/or interest in such work product, including, but not limited to, all copyrights, patents, trademarks, and propriety rights.

9. Intellectual Property. Consultant understands that all work product Consultant may create or generate under this Agreement shall be the exclusive property of CareCloud. Consultant will promptly disclose to CareCloud any invention, copyrightable material, or commercial idea or plan arising from Consultant’s Services under this Agreement. As is customary in agreements of this type, Consultant will assign to CareCloud, or procure the assignment of, any intellectual property rights under such inventions, copyrightable material, or commercial ideas or plans, without further compensation. Consultant agrees to execute, at CareCloud’s expense, such documents and cooperate with CareCloud as may be necessary or appropriate to establish, register, record, or otherwise document the assignment to CareCloud therein in the U.S. and/or foreign countries.

10. Release. Consultant agrees to release and discharge CareCloud from all claims, liabilities, losses, and costs (including, without limitation, attorneys’ fees and other costs of defense) that Consultant may now have against it arising out of or relating to CareCloud’s exercise of rights granted by this agreement, including without limitation, claims for compensation, defamation, infringement and invasion of privacy. Consultant agrees to indemnify and hold harmless CareCloud from and against any liabilities, losses, claims, costs (including without limitation attorneys’ fees and other costs of defense), and expenses arising out of or relating to Consultant’s breach of this Agreement.

11. Non-Solicitation. Consultant agrees and covenants that Consultant will not directly or indirectly do any of the following during the period of time beginning on the Commencement Date hereof and extending for a period of one (1) year from the termination of this Agreement: (a) interfere with or attempt to interfere with CareCloud’s employment relationships with any officers, employees, representatives or agents, or any of their subsidiaries or affiliates or (b) induce or attempt to induce any of them to leave the employ of CareCloud or any of their subsidiaries or affiliates, or violate the terms of their contract with any of them.

7 Clyde Road, Suite 201, Somerset, NJ 08873 | www.carecloud.com | Page | 3

CONSULTING AGREEMENT

Consultant also agrees and covenants that Consultant will not directly or indirectly (on Consultant’s own or through or on behalf of a third-party) do any of the following, during the period of time beginning on the date hereof and extending for a period of one (1) year from the termination of this Agreement: (a) call upon, solicit, advise or otherwise do, or attempt to do business in the areas of medical billing and/or related services including, transcription services, automated call reminder services, electronic practice management services such as billing software, scheduling software and the like and/or electronic medical billing or health records services (EMR/EHR), with any of CareCloud’s existing clients, regardless of where they are situated or do business. The Parties agree that this provision shall survive the termination of the consulting relationship and this Agreement.

12. Non-Disparagement. During the period ending three (3) years after the execution of this Agreement, each Party agrees to refrain from making any disparaging, negative, or uncomplimentary statements, whether public or private, regarding any Party or any of its stockholders, employees, agents, successors, assigns, employees, legal representatives, affiliates, directors, or officers.

13. Warranties. Consultant represents and warrants to CareCloud that (a) Consultant will perform all of Consultant’s Services hereunder in a professional manner consistent with industry standards; in accordance with all applicable laws, regulations, and other legal requirements; and in compliance with CareCloud policies while on CareCloud locations; (b) that Consultant will perform the Services in accordance with the criteria set forth in Exhibit A; (c) that Consultant’s employee(s) who work on CareCloud assignments are U.S. citizen(s) or are authorized to work in the U.S., and are not acting and will not act during the Term of this Agreement in violation of the Immigration Reform and Control Act of 1986 and its amendments and the regulations thereunder; and (d) Consultant has the full power and authority to enter into this Agreement and to perform its obligations under the Agreement.

14. No Assignment. Consultant acknowledges that this Agreement is for Consultant’s Services and may not be assigned, transferred, or subcontracted, in whole or in part. Any such assignment in contravention of this Section shall be null and void.

15. Compliance with Law.

| a. | Impermissible Referral Arrangements. Consultant represents and warrants that at no time will Consultant make or cause to be made any referral arrangements that are or may be deemed to be in contravention of a state or federal law, including but not limited to the federal Anti-Kickback Statute. Consultant agrees that Consultant may not: (a) refer patients or otherwise cause patients to bereferred to any healthcare provider in exchange for that healthcare provider becoming a customer of CareCloud; (b) offer discounts or free items or services as part of generating customers for CareCloud in a manner that violates applicable law; or (c) offer discounts on CareCloud’s Services in exchange for purchasing other items or services in a manner that violates applicable law.

7 Clyde Road, Suite 201, Somerset, NJ 08873 | www.carecloud.com | Page | 4

CONSULTING AGREEMENT

| b. | HIPAA Compliance. Consultant understands that CareCloud, among other things, is a provider of electronic health records (“EHR”) and, as such, CareCloud’s and its subsidiaries’ proprietary system, which Consultant may have access to, includes the receipt, creation and/or maintenance of Protected Health Information (“PHI”), as that term is defined in the Health Insurance Portability and Accountability Act of 1996 (“HIPAA”) and the Health Information Technology for Economic and Clinical Health Act (“HITECH”). In accordance with HIPAA and HITECH requirements, if necessary, Consultant will execute a Subcontractor Business Associate Agreement (“SBAA”) along with this Agreement. The failure to comply with this provision or any provision of the SBAA shall be deemed a material default of this Agreement.

16. General Provisions. This Agreement shall be governed by the laws of the State of New Jersey. Consultant acknowledges that CareCloud has not made any agreement or commitment (or offered to Consultant any such agreement or commitment) to perform any additional Services, to make any other payments to Consultant, or to enter into any other agreement or commitment with Consultant. Consultant’s obligations relating to independent contractor status, confidentiality, publications, intellectual property, and warranties will survive the expiration of any termination of this Agreement for a period of ten (10) years from the effective date of this Agreement. This Agreement, together with Exhibit A, sets forth the entire agreement between the Parties with respect to the subject matter, and may not be modified except in writing signed by Consultant and CareCloud.

If Consultant agrees to the foregoing terms, please so indicate by signing, dating, and returning to us the enclosed copy of this Agreement.

Sincerely, |
CareCloud |
By: | /s/ Elizabeth Ferrer |
Name: | Elizabeth Ferrer |
Title: | VP, Human Resources |

ACKNOWLEDGED, AGREED TO AND ACCEPTED:

Signed: | /s/ Aman Haq |  | Title: | Manager
Date: | September 19, 2025 |  | Company Name: | Stochastic Solutions, LLC

7 Clyde Road, Suite 201, Somerset, NJ 08873 | www.carecloud.com | Page | 5

EXHIBIT A

STATEMENT OF WORK

This Statement of Work (“SOW”) is incorporated into the Consulting Agreement by and between CareCloud, Inc. (“CareCloud” or “Company”) and Stochastic Solutions, LLC, (“Consultant”). This SOW describes services and work products to be performed and provided by Consultant pursuant to the Agreement (the “Services”). If any item in this SOW is inconsistent with the Agreement prior to such incorporation, the terms of this SOW will control, but only with respect to the Services to be performed under this SOW.

1. Scope of Services. Consultant shall, from the Commencement Date mentioned below, provide CareCloud with Consultative Services. Consultant will consult on the following core items and other related discovery and research assignments as requested:

Consultant will be working on the following workstreams:

Artificial Intelligence Technology – Provide technical consulting services as directed by management focused on development of innovative AI capabilities and technology solutions.

Work Locations:

| ■ | U.S. Office Site – Consultant will work at CareCloud’s Somerset, New Jersey location Monday through Friday during regular business hours.
| ■ | CareCloud’s Offshore Technology Center – Consultant will be required to travel to CareCloud’s Offshore Engineering location in Pakistan to collaborate with project colleagues and stakeholders as requested.

Consultant has represented that they are qualified to perform such Services and that they will use reasonable professional skills and their best efforts to perform Services hereunder. Consultant will abide by CareCloud’s standard policies, procedures, and rules of conduct and will comport themselves lawfully and with integrity. Consultant will at all times be and represent themselves to be an independent contractor and not an agent or employee of CareCloud.

2. Terms of Agreement. The project shall begin on July 15th, 2025 and continue on a month- to-month basis (the “Project Term”) unless terminated earlier or as provided in Section 4 of the Consulting Agreement (the “Term”). Projects will be assigned by the Company based on need.

3. Fee Schedule - Payments. Company agrees to pay Consultant $15,000 (USD) per month for the successful completion of this assignment. Reasonable travel expenses must be approved in advance and will be reimbursed and/or arranged by the Company. Consultant shall invoice Company within one week of prior month-end for work completed by emailing an invoice for the pertinent period and submitting a W-9 to payable@carecloud.com. Company agrees to remit payment to Consultant within fifteen (15) days from the invoice.

Signature | /s/ Aman Haq |  | Date | September 19, 2025

7 Clyde Road, Suite 201, Somerset, NJ 08873 | www.carecloud.com | Page | 6