Skip to main content

Checking for access

Abowire has the ability to define product-specific capabilities. These capabilities can be used to check if a customer has access to a certain feature in your system.

You can define your own capabilities and then use our GraphQL API or our SDK to check if a customer has access to a certain capability.

For example:

const isAllowed = await abowire.customer.isAllowed("customer_1", "my_feature");

This will return true if the customer has access to the capability my_feature. Otherwise, it will return false. Likewise, if the capability has a usage limit, it will return false if the customer has reached the usage limit.