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"
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"