Api / Billing
Method | Description |
---|---|
🔹 invoiceList() | List Invoices |
🔹 planCheckout() | Prepare Checkout |
🔹 planList() | List Price Plans |
🔹 subscriptionCancel() | Cancel Subscription |
🔹 subscriptionRead() | Fetch Subscription |
🔹 subscriptionUpdate() | Update Subscription |
Getting started
// Place your API Key 👇 here
$sdk = new \Kronup\Sdk();
// API Call
$sdk->api()->billing();
invoiceList()
Get a list of Invoices
#️⃣ Execute example in terminal
Request
GET
/billing/invoices
Type signature
(new \Kronup\Sdk())->api()->billing()->invoiceList(
[ int $page_number = 1, ]
[ int $page_size = 500 ]
): \Kronup\Model\InvoiceList
Parameters
Name | Type | Description |
---|---|---|
$page_number | int | [default to 1] |
$page_size | int | [default to 500] |
Return type
planCheckout()
Prepare the checkout URL for this Price Plan. The link expires in 23 hours. This method fails if a Subscription is associated with this Organization.
#️⃣ Execute example in terminal
Request
GET
/billing/price-plans/{pricePlanId}
Type signature
(new \Kronup\Sdk())->api()->billing()->planCheckout(
string $price_plan_id,
[ int $dark_mode = 0 ]
): \Kronup\Model\Checkout
Parameters
Name | Type | Description |
---|---|---|
$price_plan_id | string | Price Plan ID |
$dark_mode | int | Use dark mode [default to 0] |
Return type
planList()
Get a list of Price Plans
#️⃣ Execute example in terminal
Request
GET
/billing/price-plans
Type signature
(new \Kronup\Sdk())->api()->billing()->planList(): \Kronup\Model\PricePlanList
Parameters
This endpoint does not need any parameter.
Return type
subscriptionCancel()
Cancel the Subscription for the current Organization
#️⃣ Execute example in terminal
Request
DELETE
/billing/subscription
Type signature
(new \Kronup\Sdk())->api()->billing()->subscriptionCancel(): \Kronup\Model\Subscription
Parameters
This endpoint does not need any parameter.
Return type
subscriptionRead()
Get the Subscription model for the current organization
#️⃣ Execute example in terminal
Request
GET
/billing/subscription
Type signature
(new \Kronup\Sdk())->api()->billing()->subscriptionRead(): \Kronup\Model\SubscriptionNullable
Parameters
This endpoint does not need any parameter.
Return type
\Kronup\Model\SubscriptionNullable
subscriptionUpdate()
Update the Subscription Price Plan for the current Organization
#️⃣ Execute example in terminal
Request
PUT
/billing/subscription/price-plans/{pricePlanId}
Type signature
(new \Kronup\Sdk())->api()->billing()->subscriptionUpdate(
string $price_plan_id
): \Kronup\Model\Subscription
Parameters
Name | Type | Description |
---|---|---|
$price_plan_id | string | Price Plan ID |