cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/portal/billing/portal-session \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.self_billing.create_self_billing_portal_session()
# 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.createSelfBillingPortalSession();
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.SelfBilling.CreateSelfBillingPortalSession(ctx)
if err != nil {
log.Fatal(err)
}
if res.SelfBillingPortalResponse != nil {
// handle response
}
}{
"expires_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}SelfBilling
Create self-billing portal session
Opens a short-lived customer portal session for the caller tenant.
POST
/
portal
/
billing
/
portal-session
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/portal/billing/portal-session \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.self_billing.create_self_billing_portal_session()
# 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.createSelfBillingPortalSession();
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.SelfBilling.CreateSelfBillingPortalSession(ctx)
if err != nil {
log.Fatal(err)
}
if res.SelfBillingPortalResponse != nil {
// handle response
}
}{
"expires_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}
