datacontract / datacontract-specification

The Data Contract Specification Repository
https://datacontract.com/
MIT License
278 stars 41 forks source link

Billing as structured field #3

Closed jochenchrist closed 7 months ago

jochenchrist commented 1 year ago

To automate billing, a billing policy should be represented in a structured form.

Typical billing policies are:

Option 1: Additional Field billingPolicy

terms:
  billing: Monthly flat price
  billingPolicy:
    amount: 5000
    currency: USD
    unit: MONTH
terms:
  billing: Pay per use
  billingPolicy:
    amount: 0.005
    currency: USD
    unit: MEGABYTE
terms:
  billing: Free to use
  billingPolicy:
    amount: 0
    currency: USD
    unit: MONTH

Option 2: Reuse field billing

The field billing may be either a string or a complex type (anyOf)

terms:
  billing: Free
terms:
  billing:
    amount: 5000
    currency: USD
    unit: MONTH
simonharrer commented 10 months ago

We could have a look at https://opendataproducts.org/ for pricing, as they have a very extensive model for that.

jochenchrist commented 7 months ago

Closing issue as stale.

If Bitol standard get's mature, we can adopt the pricing section here:

https://github.com/bitol-io/open-data-contract-standard/blob/main/docs/README.md#Pricing