v61

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-08-018131,3812.6 MB
OpenMeter Customers

Create customer charge

Pre-release Endpoint This endpoint is currently in beta and is subject to change.

Create customer charge.

post/v3/openmeter/customers/{customerId}/charges

Path parameters

customerIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Request body

OR

Example request

{
  "labels": {
    "env": "test"
  },
  "currency": "USD",
  "invoice_at": "2023-01-01T01:01:01.001Z",
  "service_period": {
    "from": "2023-01-01T01:01:01.001Z",
    "to": "2023-01-01T01:01:01.001Z"
  },
  "tax_config": {
    "stripe": {
      "code": "txcd_10000000"
    },
    "tax_code_id": "01G65Z755AFWAKHE12NY0CQ9FH",
    "tax_code": {
      "id": "01G65Z755AFWAKHE12NY0CQ9FH"
    }
  },
  "amount_before_proration": {
    "currency": "USD"
  },
  "full_service_period": {
    "from": "2023-01-01T01:01:01.001Z",
    "to": "2023-01-01T01:01:01.001Z"
  },
  "billing_period": {
    "from": "2023-01-01T01:01:01.001Z",
    "to": "2023-01-01T01:01:01.001Z"
  }
}

Response

Charge created response.

OR

Example response

{
  "id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "labels": {
    "env": "test"
  },
  "created_at": "2023-01-01T01:01:01.001Z",
  "updated_at": "2023-01-01T01:01:01.001Z",
  "deleted_at": "2023-01-01T01:01:01.001Z",
  "customer": {
    "id": "01G65Z755AFWAKHE12NY0CQ9FH"
  },
  "subscription": {
    "id": "01G65Z755AFWAKHE12NY0CQ9FH",
    "phase": {
      "id": "01G65Z755AFWAKHE12NY0CQ9FH",
      "item": {
        "id": "01G65Z755AFWAKHE12NY0CQ9FH"
      }
    }
  },
  "currency": "USD",
  "invoice_at": "2023-01-01T01:01:01.001Z",
  "service_period": {
    "from": "2023-01-01T01:01:01.001Z",
    "to": "2023-01-01T01:01:01.001Z"
  },
  "full_service_period": {
    "from": "2023-01-01T01:01:01.001Z",
    "to": "2023-01-01T01:01:01.001Z"
  },
  "billing_period": {
    "from": "2023-01-01T01:01:01.001Z",
    "to": "2023-01-01T01:01:01.001Z"
  },
  "advance_after": "2023-01-01T01:01:01.001Z",
  "tax_config": {
    "stripe": {
      "code": "txcd_10000000"
    },
    "tax_code_id": "01G65Z755AFWAKHE12NY0CQ9FH",
    "tax_code": {
      "id": "01G65Z755AFWAKHE12NY0CQ9FH"
    }
  },
  "amount_after_proration": {
    "currency": "USD"
  }
}