Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Api / Billing

Method Description
🔹 invoiceList() List Invoices
🔹 planCheckout() Prepare Checkout
🔹 planList() List Price Plans
🔹 subscriptionCancel() Cancel Subscription
🔹 subscriptionRead() Fetch Subscription
🔹 subscriptionUpdate() Update Subscription

📚 Billing API Reference

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

php -f invoiceList.php

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

\Kronup\Model\InvoiceList

🔺 Back to top


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

php -f planCheckout.php

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

\Kronup\Model\Checkout

🔺 Back to top


planList()

Get a list of Price Plans

#️⃣ Execute example in terminal

php -f planList.php

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

\Kronup\Model\PricePlanList

🔺 Back to top


subscriptionCancel()

Cancel the Subscription for the current Organization

#️⃣ Execute example in terminal

php -f subscriptionCancel.php

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

\Kronup\Model\Subscription

🔺 Back to top


subscriptionRead()

Get the Subscription model for the current organization

#️⃣ Execute example in terminal

php -f subscriptionRead.php

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

🔺 Back to top


subscriptionUpdate()

Update the Subscription Price Plan for the current Organization

#️⃣ Execute example in terminal

php -f subscriptionUpdate.php

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

Return type

\Kronup\Model\Subscription

🔺 Back to top