Skip to main content
By the end of this guide you will have a fully wired Retempo integration: a live service with a monthly USDC payment plan, a checkout session ready to onboard a subscriber, an open invoice, and a settlement submitted to Arc for onchain confirmation. Every step maps to a single API call against https://api.retempo.xyz.
1

Create a Service

A service represents what you are selling. Send a POST request to /api/v1/services with a name, an optional description, and the owner’s email address. Set status to ACTIVE so that subscribers can check out immediately.
Retempo returns the new service record, including its generated id. Copy the id — you will use it in the next step.
2

Add a Payment Plan

A payment plan defines the price and billing cadence for your service. Post to /api/v1/services/:serviceId/plans, replacing :serviceId with the id you received above. This example creates a fixed $49.00 USDC monthly plan.
The response includes the plan’s id. Copy both serviceId and planId — you will need them for the checkout session.
3

Open a Checkout Session

A checkout session gives your subscriber a way to complete payment and activate their subscription. Post to /api/v1/checkout-sessions with the serviceId and paymentPlanId. The session starts in PENDING status and includes an id you can use to build a checkout URL pointing to https://retempo.xyz/checkout/:checkoutSessionId.
When the subscriber completes the session, Retempo automatically creates a subscription and the session status moves from PENDING to PAID.
4

Create an Invoice

An invoice is the billing record for a subscription cycle. Post to /api/v1/invoices with the service, plan, and subscriber identifiers. Set status to OPEN to signal that the invoice is ready for settlement.
Copy the invoice id — you will reference it when you submit the settlement.
5

Submit a Settlement

A settlement submits the payment proof to Arc for onchain confirmation. Post to /api/v1/settlements with the invoice ID, a 32-byte hex reference hash, and the payer and merchant wallet addresses. Retempo submits the transaction to Arc and monitors for confirmation.
Retempo creates the settlement record in PENDING status and submits the transaction to Arc. Once the chain confirms the transaction and records the settlement event, the status moves to CONFIRMED and the linked invoice is marked PAID.
Settlements are only marked CONFIRMED after a real Arc transaction receipt is observed. Until then, the settlement remains in PENDING or SUBMITTED status and the invoice stays OPEN.