Skip to main content
A service represents a product or API you’re billing for — think of it as the top-level entity that holds your payment plans and links to your subscribers. Every checkout session, invoice, and settlement in Retempo traces back to a service. Before you can start collecting USDC, you need at least one service with an owner attached.

Creating a service

To create a service, send a POST request to /api/v1/services. You must supply a name and either an owner.email (to create or look up the owner by email) or an ownerId (to reference an existing user). Everything else is optional.
A successful response returns the full service object, including the generated id, the resolved owner, and an empty paymentPlans array ready for your first plan:

Service statuses

Every service has a status field that controls its visibility and availability for checkout. You can set status at creation time or update it later.
Set status to ACTIVE before creating checkout sessions for the service. A session created against a non-active service will be rejected.

Listing services

To retrieve all services on your account, ordered from newest to oldest, send a GET request to /api/v1/services:
The response returns an array of service objects:

Fetching a service

To retrieve a single service along with its owner and all associated payment plans, send a GET request with the service ID: