Skip to content

Codius Billing Service

wilsonianb edited this page Feb 10, 2015 · 5 revisions

Contracts are financed based on rules surrounding their account balance, which is managed and can be credited and debited using the Codius Billing Service.

Get Contract Balance

GET /contracts/:token

Response Body:

  • balance (cpu)

Credit Contract Balance

POST /contracts/:token/credits

Request Parameters:

  • amount (cpu)
  • payment_uri

Response Body:

  • balance (cpu)

Debit Contract Balance

POST /contracts/:token/debits

Request Parameters:

  • amount (cpu)

Response Body:

  • balance (cpu)

Retrieve Contract Credits

GET /contracts/:token/credits

Response Body:

  • Array of credits

Retrieve Contract Debits

GET /contracts/:token/debits

Response Body:

  • Array of debits