Why onchain settlement?
Storing a settlement proof onchain gives you guarantees that a database record alone cannot provide.- Immutability. Once Retempo writes a settlement to Arc, no party — including Retempo — can alter or delete it. The record exists independently of Retempo’s servers.
- Public verifiability. Anyone with the Arc transaction hash can look up the settlement on the Arc explorer and confirm that a specific amount was settled between a payer and a merchant at a specific time.
- Audit trail. The Arc transaction hash serves as a durable reference you can include in your own accounting systems, compliance reports, or dispute resolution processes.
What is recorded onchain?
Retempo does not replicate your full billing history to the blockchain. Instead, the RetempoSettlement contract stores a minimal settlement proof containing exactly the fields needed for verification.| Field | Description |
|---|---|
invoiceId | The Retempo invoice this settlement closes |
serviceId | The service the invoice belongs to |
payer | The payer’s Arc wallet address |
merchant | The merchant’s Arc wallet address |
amount | The settled amount in USDC micro-units |
referenceHash | A 32-byte hash you supply as a unique proof identifier |
timestamp | Unix timestamp of the settlement |
Settlement flow
When you callPOST /api/v1/settlements, Retempo executes the following sequence before returning a confirmed response.
Create settlement record
Retempo creates a settlement record in its database with status PENDING and validates all input fields, including your
referenceHash.Submit Arc transaction
Retempo’s backend encodes and submits a
recordSettlement() call to the RetempoSettlement contract on Arc Testnet using an authorized operator wallet.Wait for receipt
The backend waits for a real Arc transaction receipt — there is no optimistic confirmation. The transaction must be mined before the flow continues.
Verify the event
Retempo inspects the receipt for a
SettlementRecorded event. If the event is absent or the receipt status is not success, the settlement is not confirmed.Retempo never marks a settlement CONFIRMED without a real Arc transaction receipt and SettlementRecorded event.
What you see as a customer
Every settlement response includes achain object that surfaces the onchain details directly.
| Field | What it tells you |
|---|---|
transactionHash | The Arc transaction hash — use this to verify the settlement on the Arc explorer |
receiptStatus | "success" means the Arc transaction was mined without reverting |
eventObserved | true means Retempo confirmed the SettlementRecorded event is present in the receipt |
transactionHash value and look it up on the Arc Testnet explorer to independently verify the settlement. You will see the SettlementRecorded event with all the fields Retempo recorded on your behalf.