Record Usage
Please log in to get a personalized configuration!
This method records uses Stripe's metered billing to record usage for a certain subscription. In order to use this mehtod, you need to have set up recurring billing. A record will be created using Stripe's API with action set to 'increment'.
This method is accessed by https://api.cryptolens.io/api/subscription/RecordUsage
Parameters
| Parameter | Description | Remarks |
| ProductId | the product id | required |
| Key | the serial key string | required |
| Amount | The amount to increment the usage counter with. | optional. 0 by default. |
| v | Method version. | optional. by default, it's 1. |
Results
| Parameter | Description | Remarks |
| Result | This is either 0(=success) or 1(=error). | always returned |
| Message | The message that provides additional information about the result. | always returned. |
Example result
{"result":0,"message":""}
Errors
| Error |
| Access denied. |
| The input parameters were incorrect. |
| Could not find the product. |
| Could not find the key. |
| No Stripe payment processor was set up. |
| The subscription item id could not be found. |
| Could not increment the usage counter. |
Made in Sweden