---
title: "Submit Billing Data"
method: POST
path: "/v1/installations/{integrationConfigurationId}/billing"
tags: ["marketplace"]
---

# Submit Billing Data

`POST /v1/installations/{integrationConfigurationId}/billing`

Sends the billing and usage data. The partner should do this at least once a day and ideally once per hour. <br/> Use the `credentials.access_token` we provided in the [Upsert Installation](#upsert-installation) body to authorize this request.

## Path parameters

- `integrationConfigurationId` string, required

## Request body

- object
  - `timestamp` string, date-time, required — Server time of your integration, used to determine the most recent data for race conditions & updates. Only the latest usage data for a given day, week, and month will be kept.
  - `eod` string, date-time, required — End of Day, the UTC datetime for when the end of the billing/usage day is in UTC time. This tells us which day the usage data is for, and also allows for your "end of day" to be different from UTC 00:00:00. eod must be within the period dates, and cannot be older than 24h earlier from our server's current time.
  - `period` object, required — Period for the billing cycle. The period end date cannot be older than 24 hours earlier than our current server's time.
    - `start` string, date-time, required
    - `end` string, date-time, required
  - `billing` union, required — Billing data (interim invoicing data).
    - object[]
      - `billingPlanId` string, required — Partner's billing plan ID.
      - `resourceId` string — Partner's resource ID.
      - `start` string, date-time — Start and end are only needed if different from the period's start/end.
      - `end` string, date-time — Start and end are only needed if different from the period's start/end.
      - `name` string, required — Line item name.
      - `details` string — Line item details.
      - `price` string, required — Price per unit.
      - `quantity` number, required — Quantity of units.
      - `units` string, required — Units of the quantity.
      - `total` string, required — Total amount.
    - object
      - `items` object[], required
        - `billingPlanId` string, required — Partner's billing plan ID.
        - `resourceId` string — Partner's resource ID.
        - `start` string, date-time — Start and end are only needed if different from the period's start/end.
        - `end` string, date-time — Start and end are only needed if different from the period's start/end.
        - `name` string, required — Line item name.
        - `details` string — Line item details.
        - `price` string, required — Price per unit.
        - `quantity` number, required — Quantity of units.
        - `units` string, required — Units of the quantity.
        - `total` string, required — Total amount.
      - `discounts` object[]
        - `billingPlanId` string, required — Partner's billing plan ID.
        - `resourceId` string — Partner's resource ID.
        - `start` string, date-time — Start and end are only needed if different from the period's start/end.
        - `end` string, date-time — Start and end are only needed if different from the period's start/end.
        - `name` string, required — Discount name.
        - `details` string — Discount details.
        - `amount` string, required — Discount amount.
  - `usage` object[], required
    - `resourceId` string — Partner's resource ID.
    - `name` string, required — Metric name.
    - `type` 'total' | 'interval' | 'rate', required — Type of the metric. - total: measured total value, such as Database size - interval: usage during the period, such as i/o or number of queries. - rate: rate of usage, such as queries per second.
    - `units` string, required — Metric units. Example: "GB"
    - `dayValue` number, required — Metric value for the day. Could be a final or an interim value for the day.
    - `periodValue` number, required — Metric value for the billing period. Could be a final or an interim value for the period.
    - `planValue` number — The limit value of the metric for a billing period, if a limit is defined by the plan.

## Response `201`

## Other responses

- `400` — One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource.
- `404`
- `410`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/revisions/61d1ba3f6dac/schema)
