# getCompanyPaymentSummary

**Identifier:** `openpayments_getCompanyPaymentSummary`

**Provider:** [OpenPayments](https://kirha.com/providers/openpayments.md)

Get a manufacturer's CMS Open Payments totals: general, research and ownership payments for every program year since 2019, plus for one program year the general-payment breakdown by nature of payment (consulting, speaker fees, food, travel...) and by product. Use product names returned here with getTopPaymentRecipients.

## Run it with the CLI

```bash
kirha tools run openpayments_getCompanyPaymentSummary \
  --input '{
    "companyId": "<companyId>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "openpayments_getCompanyPaymentSummary",
  "input": {
    "companyId": "<companyId>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "companyId": {
      "description": "From searchOpenPaymentsCompanies",
      "pattern": "^\\d+$",
      "type": "string"
    },
    "programYear": {
      "description": "Program year. Defaults to the latest published year (CMS publishes each June).",
      "maximum": 2100,
      "minimum": 2013,
      "type": "integer"
    }
  },
  "required": [
    "companyId"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "breakdownYear": {
      "type": "number"
    },
    "byNatureOfPayment": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number"
          },
          "natureOfPayment": {
            "type": "string"
          },
          "transactions": {
            "type": "number"
          }
        },
        "required": [
          "natureOfPayment",
          "amount",
          "transactions"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "companyId": {
      "type": "string"
    },
    "companyName": {
      "type": "string"
    },
    "context": {
      "type": "string"
    },
    "currency": {
      "const": "usd",
      "type": "string"
    },
    "topProducts": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number"
          },
          "productName": {
            "type": "string"
          },
          "productType": {
            "type": "string"
          },
          "therapeuticArea": {
            "type": "string"
          },
          "transactions": {
            "type": "number"
          }
        },
        "required": [
          "productName",
          "amount",
          "transactions"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "yearlyTotals": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "generalPayments": {
            "type": "number"
          },
          "generalTransactions": {
            "type": "number"
          },
          "ownershipInvestment": {
            "type": "number"
          },
          "ownershipValue": {
            "type": "number"
          },
          "programYear": {
            "type": "number"
          },
          "researchPayments": {
            "type": "number"
          },
          "researchTransactions": {
            "type": "number"
          }
        },
        "required": [
          "programYear",
          "generalPayments",
          "researchPayments",
          "ownershipInvestment",
          "ownershipValue",
          "generalTransactions",
          "researchTransactions"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "companyId",
    "currency",
    "yearlyTotals",
    "breakdownYear",
    "byNatureOfPayment",
    "topProducts"
  ],
  "type": "object"
}
```

## Related tools

Other OpenPayments tools that this tool refers to, or that refer to it.

- [`getTopPaymentRecipients`](https://kirha.com/providers/openpayments/getTopPaymentRecipients.md)
- [`searchOpenPaymentsCompanies`](https://kirha.com/providers/openpayments/searchOpenPaymentsCompanies.md)

-----

[All OpenPayments tools](https://kirha.com/providers/openpayments.md) · [< Back to tools list](https://kirha.com/tools.md)