API Client for epilot Billing API
npm install @epilot/billing-client@epilot/billing-clientAPI Client for epilot Billing API.
Uses openapi-client-axios
Install the package:
``bash`
npm install --save-dev @epilot/billing-client
Import the package:
`typescript`
import { getClient } from '@epilot/billing-client';
Use the client:
`typescript
// get typed client
const client = await getClient();
// call an operation
const res = await client.testAuth();
`
To pass an authorization header and set up the API url, you can use axios
defaults:
`typescriptBearer ${token}
const client = getClient();
client.defaults.baseURL = config.CUSTOMER_PORTAL_API;
client.defaults.headers['authorization'] = ;``
https://docs.api.epilot.io/