Quotas

Centrapay account quotas are enforced on usage types such as spending or topping up, and may apply to a time period (daily, monthly, yearly). Account quotas may be affected by the verification status of the Centrapay account.

Attributes

  • type

    string

    The quota’s type. See Supported Quota Types.

  • limit

    bignumber

    The quota’s upper usage limit.

  • usage

    bignumber

    The quota’s current usage.

  • assetType

    string

    The type of asset the quota is scoped to, eg centrapay.nzd.main.

  • period

    string

    The recurring, time-bound quota’s duration: daily, monthly or yearly.

  • interval

    string

    The specific day, month or year the quota applies to, eg: 2020-01-01, 2020-01, 2020.

Supported Quota Types

TypeDescriptionScopedPeriods
spendValue of wallet-based payments or asset transfers from the account.Yesmonthly yearly
topupValue of topups from bank accounts linked to the account.Yesmonthly yearly

GET /api/accounts/{accountId}/quotas

Retrieve quota limits and usages for the current intervals. Ie, all quotas for the current day, current month and current year as well as any quotas that are not associated with a temporal period.

Errors

If a quota limit is exceeded by an action that enforces quota limits, an error response will be returned. The quotas field will contain all quota limits that are exceeded with the usage set to the amount that the quota would have been updated to if the action was completed.

Error Response
{
"message": "QUOTA_EXCEEDED",
"quotas": [
{
"limit": "9999",
"interval": "2021",
"period": "yearly",
"usage": "10000",
"type": "topup",
"assetType": "centrapay.nzd.main"
}
]
}
Request
curl -X GET \
https://service.centrapay.com/api/accounts/Jaim1Cu1Q55uooxSens6yk/quotas \
-H 'x-api-key: <TOKEN>'
Response
[
{
"limit": "1000",
"interval": "2021-03",
"period": "monthly",
"usage": "500",
"type": "spend",
"assetType": "centrapay.nzd.main"
},
{
"limit": "9999",
"interval": "2021",
"period": "yearly",
"usage": "1555",
"type": "spend",
"assetType": "centrapay.nzd.main"
},
{
"limit": "1000",
"interval": "2021-03",
"period": "monthly",
"usage": "500",
"type": "topup",
"assetType": "centrapay.nzd.main"
},
{
"limit": "9999",
"interval": "2021",
"period": "yearly",
"usage": "5000",
"type": "topup",
"assetType": "centrapay.nzd.main"
}
]