POST
/
check
import { Autumn as autumn } from 'autumn-js';

const response = await autumn.check({
  customer_id: 'user_123',
  feature_id: 'messages'
});
{
  "customer_id": "user_123",
  "feature_id": "messages",
  "code": "feature_found",
  "allowed": true,
  "balance": {
    "balance": 100,
    "required_balance": 12
  }
}

If the customer_id you send doesn’t already exist, Autumn will automatically create a new customer. You can optionally set the properties of this new customer through the customer_data field.

Authorizations

Authorization
string
header
required

Use your Autumn Secret Key as the Bearer token.

Body

application/json

Response

200 - application/json

The response is of type object.