API Reference

Quota

💡 To populate relational property, please use include query parameter in the API call.
NameTypeDescription
idstringQuota ID
chainIdstringChain ID
gatewaystringGateway address
quotaHashstringHash of the quota data
payerstringPayer address
payerNoncestringPayer nonce
tokenstringToken address
amountstringQuota amount
startTimestringStart time of the quota (Timestamp)
endTimestringEnd time of the quota (Timestamp)
intervalstringTime between charge cycles (in seconds)
chargeWindowstringTime window for charging (in seconds)
controllerstringController address
controllerRefIdstringController reference ID
signaturestringQuota signature
isCancelledbooleanFlag indicating if quota is cancelled
cancelledTimestring | nullTime when quota was cancelled (Timestamp)
cancelledReasonstring | nullReason for quota cancellation
currentCycleStartstring | nullStart time of the current quota cycle (Timestamp)
currentCycleEndstring | nullEnd time of the current quota cycle (Timestamp)
statusstringCurrent status of the quota. Possible values: not_started, pending_first_charge, active, pending_next_charge, ended.
createdAtnumberTimestamp when the quota was created
updatedAtnumberTimestamp when the quota was updated
subscriptionSubscription | nullSubscription object
type Quota = {
  id: string
  chainId: string
  gateway: string
  quotaHash: string
  payer: string
  payerNonce: string
  token: string
  amount: string
  startTime: string
  endTime: string
  interval: string
  chargeWindow: string
  controller: string
  controllerRefId: string
  signature: string
  isCancelled: boolean
  cancelledTime: string | null
  cancelledReason: string | null
  currentCycleStart: string | null
  currentCycleEnd: string | null
  status: string
  createdAt: number
  updatedAt: number
  // subscription: Subscription | null
}
{
  "id": "quo_3g7nayf85ps5soo4w0k",
  "chainId": "80001",
  "gateway": "0xBFAbFfb480F262cF1Cd6D10C3420F92c2492ae5f",
  "quotaHash": "0x68f680f4f44c4d4d1806db97712302481909431e09316e6130beca1233ce4816",
  "payer": "0xd6550b4d75b2861894c3ca4b0da3390207f23dab",
  "payerNonce": "0",
  "token": "0x17d9b6d438de82763351bcd732d01a203a46fa01",
  "amount": "12000000",
  "startTime": "1684487995",
  "endTime": "1099511627775",
  "interval": "2592000",
  "chargeWindow": "604800",
  "controller": "0xf942abc91866abe495b4fd2daf964419217a692b",
  "controllerRefId": "0x00000000d9674638be1096f8d6550b4d75b2861894c3ca4b0da3390207f23dab",
  "signature": "0x735c6f9f1b13df9f75ffeb000109691fd4364f5ba11085e1834f3e3104bac545701f599197447abfe83f92b06420ee4d968a2d27c441e1d3d1327a8e0ae916f31c",
  "isCancelled": false,
  "isCancelledByProductOwner": null,
  "cancelledTime": null,
  "cancelledReason": null,
  "currentCycleStart": "1684487995",
  "currentCycleEnd": "1687079995",
  "status": "active",
  "createdAt": 1684491613,
  "updatedAt": 1684494005
}