Skip to main content
Use this endpoint to create a new service in Retempo. A service is the top-level resource that holds payment plans, checkout sessions, and settlement records. You can attach an owner to the service either by referencing an existing user ID with ownerId, or by passing an owner object to create or upsert an owner by email address.

Request Body

string
required
The display name for your service. This value appears in the Retempo dashboard, on invoices, and in checkout sessions presented to payers.
string
A human-readable description of the service. Use this to communicate what the service does or what the subscriber receives.
string
default:"DRAFT"
The initial lifecycle status of the service. Accepted values are DRAFT, ACTIVE, and DISABLED.
  • DRAFT — the service is created but not yet visible for checkout.
  • ACTIVE — the service is live and can accept new subscribers.
  • DISABLED — the service is deactivated and cannot accept new checkout sessions.
string
The ID of an existing Retempo user to assign as the service owner. Use this field or the owner object — not both. If both are provided, ownerId takes precedence.
object
An object to create or upsert a service owner by email. If a user with the given email already exists, Retempo links that user to the service. If no user exists, a new one is created.
Supply either ownerId or the owner object — not both. If neither is provided, the request returns 400 with "ownerId or owner.email is required.". If you need to associate an owner you have already created, prefer ownerId to avoid accidental upserts.

Response

A successful request returns HTTP 201 Created with the new service object.
object
The newly created service object.

Error Responses

Examples

Create a service with a new owner:
Create a service assigned to an existing owner:
Start services in DRAFT status while you configure payment plans. Switch to ACTIVE only when you are ready to accept subscribers.