Money

Record metered usage against a billing account

Seller-called; amount is computed server-side from the product's price. The overdraft check runs inside a row lock (with_lock) -- the balance IS the spend cap. Only credit in the currency the product is priced in counts; credit in another currency does not pay for it. Supports an Idempotency-Key header.

post/api/v1/usage_events

Request

  • Base URL: https://saltapp.ai
  • URL: https://saltapp.ai/api/v1/usage_events
  • Auth: one of:
    • API key in header api-key
    • OAuth 2 (authorization code, authorization URL https://saltapp.ai/oauth2/authorize, token URL https://saltapp.ai/api/oauth2/token, scopes: money)

Request body

product_idstring required
chat_idstring required
payer_idstring

Required in a group chat.

qtystring
descriptionstring

Response

OK.

okboolean
entry_idstring
balancestring

Balance in the product's currency.

chainstring
testnetboolean
currencystring

Changes

No recorded changes to this operation across all 3 revisions of this API.