Skip to main content
There are two ways to link a Stripe customer to your own internal user/customer ID: The easiest way to link a Stripe customer with your own internal ID is to add it to a Stripe customer’s metadata. This can be done when navigating to checkout page using Stripe’s API.
If you use PriceOS’s checkout or customer portal endpoint, this will be done automatically for you.
By default, if you name the metadata field priceos_customer_id it will automatically be linked by PriceOS. If you already have a metadata field for your internal customer ID or just want to use another name, you can specify it in your Settings. // TODO: screenshot of where to select ID field

Manually via API

You can also link Stripe customers to your internal customer ID using the link endpoint.
const customer = await priceos.customers.link({
  stripeCustomerId: "cus_123", // Stripe customer ID
  customerId: "customer_123", // Your internal customer ID
});
This only needs to be done once per customer. Do it when the Stripe customer is created.
This is safe to run even before the customer is created in our system.

CSV upload

If you want to link many existing customers at once, use bulk CSV upload in the Customers section of the dashboard.