Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Essentials
SDKs
API
Testing
Stripe CLI
Sample projects
Tools
Stripe Dashboard
Workbench
Developers Dashboard
Stripe for Visual Studio Code
Terraform
Stripe Discord server
Features
Workflows
Batch jobs
Event destinations
Stripe health alertsStripe SignalsFile uploads
AI solutions
Agent toolkit
Model Context ProtocolBuild agentic AI SaaS Billing workflows
Security and privacy
Security
Activity logsStripebot web crawler
Privacy
Extend Stripe
Overview
Build Stripe apps
Use apps from Stripe
Build extensions
Custom objects
Partners
Partner ecosystem
Partner certification
United States
English (United States)
  1. Home/
  2. Developer resources
Private preview

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:

Use caseDescription
Installment plansDefine a custom InstallmentPlan object with fields for balance, payment schedule, and status. Attach methods that generate bills on a recurring schedule, handle payments as they come in, and mark the plan as complete when the balance reaches zero. Expose an API endpoint to let customers request early payoff. Stripe stores the installment plan alongside the customer, invoices, and payment records it references. No external database or cron jobs required.
Insurance policiesModel the full quote-to-policy lifecycle with custom objects for InsuranceQuote and InsurancePolicy. Define methods that activate a policy when a quote is accepted, calculate pro-rata refunds on cancellation, and trigger renewal quotes automatically on a schedule. Your operations team can manage policies directly in the Stripe Dashboard while developers interact with the same data through the API.
Media subscriptionsImplement subscription models that don’t necessarily fit into standard billing. A MediaSubscription object can support trial-to-paid flows without requiring a payment method up front, custom pause and resume states, and flexible upgrade paths between tiers. Methods handle the transitions, enforce business rules, and trigger the right billing actions at each step.
Logistics and fulfillmentTrack shipments, carrier details, and delivery status within Stripe alongside the payments and related invoices.
Operational dataBring domain-specific data like contracts, tickets, or service records into Stripe so your team can operate from a single system.
App developmentIf you build Stripe Apps, you can package custom object definitions in your app to store settings or extend its functionality.

How custom objects work

When you work with custom objects, you follow these steps:

  1. 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.

  2. 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_policies/:id/cancel that your application or team can call directly.
    • 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.

  3. 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.

Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Chat with Stripe developers on Discord.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc
On this page