Custom objectsPrivate preview
Build custom data models and business logic directly in Stripe.
You can use custom objects to define structured data models and attach business logic directly in Stripe, so Stripe mirrors how your business actually works.
With custom objects, you can:
- Model your business on Stripe: Represent domain entities, relationships, and custom types as first-class resources. You can also use structured data to build on existing Stripe objects such as Customers, Products, and Invoices.
- Define your own data and logic: Create custom business models directly in Stripe. Use methods to attach logic to your data and custom objects, automate processes, react to events, and expose API endpoints.
- Reduce back-end complexity: Store and manage domain data alongside payments using a consistent API. Rely on the Stripe infrastructure for data integrity, security, and access controls, without maintaining a separate database.
Interested in getting early access to custom objects?
Enter your email to request access.
What you can build
Use custom objects if you have a business with domain-specific needs that go beyond the Stripe standard data models. Here are some examples of what you can build:
How custom objects work
When you work with custom objects, you follow these steps:
Define your object: Create a custom object definition with the fields that matter to your business: text, numbers, dates, enums, monetary amounts, and so on. Establish relationships to Stripe objects (such as Customers, Invoices, and Subscriptions) and to other custom objects.
You can define objects programmatically through the API, visually in the Stripe Dashboard, or package them as part of a Stripe App.
Implement your business logic: Define methods on your custom objects that encode your domain rules. Methods can:
- React to events: Run automatically when something happens in Stripe (for example, a bill is paid or a record object is created).
- Expose API endpoints: Create domain-specific actions like
/v2/extend/objects/insurance_that your application or team can call directly.policies/:id/cancel - Orchestrate Stripe resources: Create invoices, update records, and manage state within the Stripe infrastructure.
Methods run on the Stripe infrastructure. You write your own logic, and Stripe handles execution, reliability, and scaling.
Manage through the Dashboard and API: View, create, and update custom object records directly in the Stripe Dashboard. Your team can perform domain-specific actions such as accepting a quote, canceling a policy, or pausing a subscription without switching to a separate tool.
Developers get full API and SDK support for programmatic access. Each custom object gets its own set of API endpoints, and you can generate a typed SDK for your language of choice.
Before you begin
Custom objects are in active development. You can:
- Define custom objects
- Create and manage records
- Attach methods with business logic
- Manage custom objects through the API, SDK, and Dashboard
You currently canât use custom objects with Connect or Organizations.
