API

BillingCheckoutSession

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{organization_id}/billing/checkout_sessions create Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

created, err := client.BillingCheckoutSession(nil).Create(map[string]any{"organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local created, err = client:BillingCheckoutSession():create({ organization_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$created = $client->BillingCheckoutSession()->create(["organization_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

created = client.BillingCheckoutSession().create({ "organization_id": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

created = client.BillingCheckoutSession.create({ "organization_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const created = await client.BillingCheckoutSession().create({ organization_id: "example" })

Fields

Field Type Required Description
cancel_url string No Cancel Url
coupon_code string No Coupon Code
entry_point string No Where the owner chose to pay, for product analytics.
package_key string No Package Key
package_revision integer No Package Revision
success_url string No Success Url

create

POST /api/v1/organizations/{organization_id}/billing/checkout_sessions

Operation ID: api_v1_organization_billing_checkout_sessions.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes

Request body

application/json

Property Type Required Description
cancel_url string No
coupon_code string No
entry_point enum: onboarding, billing_settings No Where the owner chose to pay, for product analytics.
package_key string No
package_revision integer No
success_url string No

Responses

200: Success

application/json

The response is object.

201: The hosted Checkout URL to redirect the browser to

application/json

Property Type Required Description
url string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway