cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/portal/billing/checkout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"address_city": "<string>",
"address_country": "<string>",
"address_line1": "<string>",
"address_postal_code": "<string>",
"email": "<string>",
"name": "<string>",
"address_line2": "<string>",
"address_state": "<string>",
"tax_id": "<string>"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.self_billing.start_self_billing_checkout(address_city="<value>", address_country="<value>", address_line1="856 Hammes Creek", address_postal_code="<value>", email="Pamela.Rogahn3@gmail.com", name="<value>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.selfBilling.startSelfBillingCheckout({
addressCity: "<value>",
addressCountry: "<value>",
addressLine1: "856 Hammes Creek",
addressPostalCode: "<value>",
email: "Pamela.Rogahn3@gmail.com",
name: "<value>",
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.SelfBilling.StartSelfBillingCheckout(ctx, types.SelfBillingCheckoutRequest{
AddressCity: "<value>",
AddressCountry: "<value>",
AddressLine1: "856 Hammes Creek",
AddressPostalCode: "<value>",
Email: "Pamela.Rogahn3@gmail.com",
Name: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.SelfBillingCheckoutResponse != nil {
// handle response
}
}{
"checkout_id": "<string>",
"status": "initiated",
"tenant_status": "trialing",
"terminal": true,
"url": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}SelfBilling
Start self-billing checkout
Saves the billing details and opens the checkout that ends the caller tenant’s trial.
POST
/
portal
/
billing
/
checkout
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/portal/billing/checkout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"address_city": "<string>",
"address_country": "<string>",
"address_line1": "<string>",
"address_postal_code": "<string>",
"email": "<string>",
"name": "<string>",
"address_line2": "<string>",
"address_state": "<string>",
"tax_id": "<string>"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.self_billing.start_self_billing_checkout(address_city="<value>", address_country="<value>", address_line1="856 Hammes Creek", address_postal_code="<value>", email="Pamela.Rogahn3@gmail.com", name="<value>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.selfBilling.startSelfBillingCheckout({
addressCity: "<value>",
addressCountry: "<value>",
addressLine1: "856 Hammes Creek",
addressPostalCode: "<value>",
email: "Pamela.Rogahn3@gmail.com",
name: "<value>",
});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.SelfBilling.StartSelfBillingCheckout(ctx, types.SelfBillingCheckoutRequest{
AddressCity: "<value>",
AddressCountry: "<value>",
AddressLine1: "856 Hammes Creek",
AddressPostalCode: "<value>",
Email: "Pamela.Rogahn3@gmail.com",
Name: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.SelfBillingCheckoutResponse != nil {
// handle response
}
}{
"checkout_id": "<string>",
"status": "initiated",
"tenant_status": "trialing",
"terminal": true,
"url": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Body
application/json
Billing details

