OpenMeter Customers

Create customer charge

Changed on

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

Create customer charge.

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

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v3/openmeter/customers/{customerId}/charges
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Path parameters

customerIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Request body

OR

Example request

{
  "labels": {
    "env": "test"
  },
  "currency": "USD",
  "cost_basis": {
    "fiat_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"
  },
  "feature": {
    "id": "01G65Z755AFWAKHE12NY0CQ9FH"
  },
  "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

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the ////// response property for the response status

    • warning

      added the new unique enum value to the ////// response property for the response status

    • info

      endpoint added