All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
addSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/add | Add Seats |
cancelSubscription | POST /subscription/{subscriptionId}/cancel | Cancel Subscription |
changeSubscriptionPrice | POST /subscription/{subscriptionId}/price | Change Price |
createSubscription | POST /customer/{customerId}/subscription/start | Create Subscription |
customerChangeSubscriptionPlan | POST /subscription/{subscriptionId}/plan | Change Subscription Plan |
extendTrial | POST /subscription/{subscriptionId}/extend | Extend Trial Subscription |
getActiveForCustomer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions |
getForCustomer | GET /customer/{customerId}/subscription | List Customer Subscriptions |
listSubscriptionPlans | GET /subscription/plans | List Subscription Plans |
listSubscriptions | GET /subscription | List |
removeSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats |
showSubscriptionById | GET /subscription/{subscriptionId} | Detail |
startTrial | POST /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer |
\BillaBear\Model\InlineResponse20011 addSeatsSubscriptions($body, $subscription_id)
Add Seats
Adds seats to a per seat subscription
Since 1.1.4
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\SeatsAddBody(); // \BillaBear\Model\SeatsAddBody |
$subscription_id = "subscription_id_example"; // string | The id of the subscription to retrieve
try {
$result = $apiInstance->addSeatsSubscriptions($body, $subscription_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->addSeatsSubscriptions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\SeatsAddBody | ||
subscription_id | string | The id of the subscription to retrieve |
\BillaBear\Model\InlineResponse20011
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string cancelSubscription($body, $subscription_id)
Cancel Subscription
Info for a specific subscription
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\SubscriptionIdCancelBody(); // \BillaBear\Model\SubscriptionIdCancelBody |
$subscription_id = "subscription_id_example"; // string | The id of the subscription to retrieve
try {
$result = $apiInstance->cancelSubscription($body, $subscription_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->cancelSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\SubscriptionIdCancelBody | ||
subscription_id | string | The id of the subscription to retrieve |
string
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse20011 changeSubscriptionPrice($body, $subscription_id)
Change Price
Changes the price being used for a price. Useful for changing pricing schedule or just price.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\SubscriptionIdPriceBody(); // \BillaBear\Model\SubscriptionIdPriceBody |
$subscription_id = "subscription_id_example"; // string | The id of the subscription to retrieve
try {
$result = $apiInstance->changeSubscriptionPrice($body, $subscription_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->changeSubscriptionPrice: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\SubscriptionIdPriceBody | ||
subscription_id | string | The id of the subscription to retrieve |
\BillaBear\Model\InlineResponse20011
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\Subscription createSubscription($body, $customer_id)
Create Subscription
Create subscription for a customer
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\SubscriptionStartBody(); // \BillaBear\Model\SubscriptionStartBody |
$customer_id = "customer_id_example"; // string | The id of the customer to retrieve
try {
$result = $apiInstance->createSubscription($body, $customer_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->createSubscription: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\SubscriptionStartBody | ||
customer_id | string | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\Subscription customerChangeSubscriptionPlan($body, $subscription_id)
Change Subscription Plan
Change the subscription plan for a customer
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\SubscriptionIdPlanBody(); // \BillaBear\Model\SubscriptionIdPlanBody |
$subscription_id = "subscription_id_example"; // string | The id of the subscription to retrieve
try {
$result = $apiInstance->customerChangeSubscriptionPlan($body, $subscription_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->customerChangeSubscriptionPlan: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\SubscriptionIdPlanBody | ||
subscription_id | string | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\Subscription extendTrial($body, $subscription_id)
Extend Trial Subscription
Extend a trial subscription so it's converted from a trial to a normal subscription.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\SubscriptionIdExtendBody(); // \BillaBear\Model\SubscriptionIdExtendBody |
$subscription_id = "subscription_id_example"; // string | The id of the subscription to retrieve
try {
$result = $apiInstance->extendTrial($body, $subscription_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->extendTrial: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\SubscriptionIdExtendBody | ||
subscription_id | string | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse2006 getActiveForCustomer($customer_id)
List Customer Active Subscriptions
List all Active customer subscriptions
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$customer_id = "customer_id_example"; // string | The id of the customer to retrieve
try {
$result = $apiInstance->getActiveForCustomer($customer_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->getActiveForCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
customer_id | string | The id of the customer to retrieve |
\BillaBear\Model\InlineResponse2006
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse2006 getForCustomer($customer_id)
List Customer Subscriptions
List all customer subscriptions
Since 1.1
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$customer_id = "customer_id_example"; // string | The id of the customer to retrieve
try {
$result = $apiInstance->getForCustomer($customer_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->getForCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
customer_id | string | The id of the customer to retrieve |
\BillaBear\Model\InlineResponse2006
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse20010 listSubscriptionPlans($limit, $last_key)
List Subscription Plans
List all subscriptions plans
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$limit = 56; // int | How many items to return at one time (max 100)
$last_key = "last_key_example"; // string | The key to be used in pagination to say what the last key of the previous page was
try {
$result = $apiInstance->listSubscriptionPlans($limit, $last_key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->listSubscriptionPlans: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
limit | int | How many items to return at one time (max 100) | [optional] |
last_key | string | The key to be used in pagination to say what the last key of the previous page was | [optional] |
\BillaBear\Model\InlineResponse20010
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse2006 listSubscriptions($limit, $last_key)
List
List all subscriptions
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$limit = 56; // int | How many items to return at one time (max 100)
$last_key = "last_key_example"; // string | The key to be used in pagination to say what the last key of the previous page was
try {
$result = $apiInstance->listSubscriptions($limit, $last_key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->listSubscriptions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
limit | int | How many items to return at one time (max 100) | [optional] |
last_key | string | The key to be used in pagination to say what the last key of the previous page was | [optional] |
\BillaBear\Model\InlineResponse2006
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse20011 removeSeatsSubscriptions($body, $subscription_id)
Remove Seats
Remove seats to a per seat subscription
Since 1.1.4
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\SeatsRemoveBody(); // \BillaBear\Model\SeatsRemoveBody |
$subscription_id = "subscription_id_example"; // string | The id of the subscription to retrieve
try {
$result = $apiInstance->removeSeatsSubscriptions($body, $subscription_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->removeSeatsSubscriptions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\SeatsRemoveBody | ||
subscription_id | string | The id of the subscription to retrieve |
\BillaBear\Model\InlineResponse20011
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\Subscription showSubscriptionById($subscription_id)
Detail
Info for a specific subscription
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$subscription_id = "subscription_id_example"; // string | The id of the subscription to retrieve
try {
$result = $apiInstance->showSubscriptionById($subscription_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->showSubscriptionById: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
subscription_id | string | The id of the subscription to retrieve |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\Subscription startTrial($body, $customer_id)
Start Trial Subscription For Customer
Start subscription for a customer
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\SubscriptionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\SubscriptionTrialBody(); // \BillaBear\Model\SubscriptionTrialBody |
$customer_id = "customer_id_example"; // string | The id of the customer to retrieve
try {
$result = $apiInstance->startTrial($body, $customer_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SubscriptionsApi->startTrial: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\SubscriptionTrialBody | ||
customer_id | string | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]