Skip to main content

Get a customer

You can get a customer using the GET customer endpoint.
const customer = await priceos.customers.get("customer_123");
curl -X GET "https://api.priceos.com/v1/customers/customer_123" \
  -H "x-api-key: PRICEOS_API_KEY"
The customer object will have feature access info too.

Update a customer

You can use the PUT customer endpoint to update customer info, add/remove custom products, and more.
const customer = await priceos.customers.update({
  customerId: "customer_123",
  name: "Alex Johnson",
  email: "alex@acme.com",
});
curl -X PUT "https://api.priceos.com/v1/customers/customer_123" \
  -H "x-api-key: PRICEOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alex Johnson",
    "email": "alex@acme.com"
  }'
If the customer exists in Stripe, then any updates to name/email will be overwritten if updated again in Stripe.

Delete a customer

You can delete customers using the DELETE customer endpoint.
const result = await priceos.customers.delete("customer_123");
curl -X DELETE "https://api.priceos.com/v1/customers/customer_123" \
  -H "x-api-key: PRICEOS_API_KEY"
If a customer exists in Stripe, you will need to delete the customer in Stripe - not PriceOS.