Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const session = await priceos.customers.createPortal("customer_123");curl -X POST "https://api.priceos.com/v1/customers/customer_123/customer_portal" \
-H "x-api-key: PRICEOS_API_KEY"{
"url": "https://billing.stripe.com/p/session/test_123"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Customers
Open Customer Portal
Create a Stripe customer portal session URL for a customer.
POST
/
v1
/
customers
/
{customerId}
/
customer_portal
Node.js
import { PriceOS } from "priceos";
import type { MyFeatures } from "./priceos.types";
const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);
const session = await priceos.customers.createPortal("customer_123");curl -X POST "https://api.priceos.com/v1/customers/customer_123/customer_portal" \
-H "x-api-key: PRICEOS_API_KEY"{
"url": "https://billing.stripe.com/p/session/test_123"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Headers
API key from your PriceOS dashboard.
Path Parameters
Internal customer ID.
Body
application/json
Optional billing-only portal flow to open directly.
Available options:
payment_method_update Response
Customer portal session
Stripe customer portal URL.