Developers can apply limits on the usage of meta transactions from the Dashboard on a per DApp, per User and per API for each user.
So before sending meta transactions on the client-side, developers can use this API to check whether the limits have already reached or not. If limits are reached developers can either fall back to the default web3 provider, show a message to the user that your free transaction limits have been exhausted, and let the user pay the gas fee or show an error message to the user.
// When limits are not exhausted{"code": 200,"message": "Limits are not consumed","responseCode": 200,"allowed": true}// When DApp limit is exhausted{"code": 150,"message": "DApp limit reached","responseCode": 200,"limit": {"allowed": false,"type": 0,"limitLeft": -0.001542277,"resetTime": 1594684800000},"allowed": false}// When User limit is exhausted{"code": 151,"message": "User limit reached","responseCode": 200,"limit": {"allowed": false,"type": 1,"limitLeft": 0,"resetTime": 1594684800000},"allowed": false}// When API/User limit is exhausted{"code": 152,"message": "API limit reached","responseCode": 200,"limit": {"allowed": false,"type": 1,"limitLeft": 0,"resetTime": 1594684800000},"allowed": false}
Example Curl Request
curl --request GET --url 'https://api.biconomy.io/api/v1/dapp/checkLimits?userAddress=<USER_ADDRESS>&apiId=<API_ID_HERE>' --header 'x-api-key: <API_KEY_HERE>'