Arc Testnet details
Retempo currently operates on Arc Testnet. Use the details below if you want to query the chain directly or configure a local wallet for exploratory purposes.| Property | Value |
|---|---|
| Network name | Arc Testnet |
| Chain ID | 5042002 |
| RPC URL | https://rpc.testnet.arc.network |
You do not need to add Arc Testnet to a wallet or hold any native tokens to use Retempo. All on-chain interactions are handled by Retempo’s authorized operator wallet.
RetempoSettlement contract
The RetempoSettlement contract is a settlement registry deployed on Arc Testnet. Its sole purpose is to record a compact, immutable proof that a payment occurred between a payer and a merchant. It is not a billing engine, an escrow contract, or a token vault — it does not hold funds or execute transfers. Every record it stores was written by Retempo’s authorized operator wallet after verifying the payment offchain.recordSettlement
This is the core write function. Retempo’s backend calls it once per settlement after all offchain validation passes.
| Parameter | Type | Description |
|---|---|---|
invoiceId | string | The Retempo invoice identifier |
serviceId | string | The Retempo service identifier |
payer | address | Arc wallet address of the paying party |
merchant | address | Arc wallet address of the receiving party |
amount | uint256 | Settled amount in USDC micro-units (6 decimal places) |
referenceHash | bytes32 | A 32-byte proof identifier you supply at settlement time |
timestamp | uint256 | Unix timestamp of the settlement |
settlementId (a bytes32 value) that uniquely identifies the record. Only an authorized operator wallet can call recordSettlement — any other caller will be rejected.
SettlementRecorded event
Every successful recordSettlement call emits this event. Retempo’s backend checks for this event in the transaction receipt before marking a settlement CONFIRMED.
settlementId, payer, and merchant fields are indexed, which means you can filter Arc event logs for any combination of those values.
getSettlement
Use this view function to read a settlement record directly from the contract, without going through the Retempo API.
SettlementRecord struct:
exists field first — if it is false, no record with that settlementId has been written to the contract.
computeSettlementId
This pure function lets you precompute the settlementId for a given set of settlement parameters without submitting a transaction.
settlementId offchain and verify it against the value returned by the Retempo API or the SettlementRecorded event.
Verifying a settlement
Once you have atransactionHash from the Retempo settlement response, you can independently verify the settlement on Arc Testnet in two ways.
Using the Arc explorer
- Copy the
transactionHashfrom your settlement response. - Paste it into the Arc Testnet explorer search bar.
- Open the Logs or Events tab on the transaction page.
- Confirm a
SettlementRecordedevent is present with the expectedinvoiceId,amount, andreferenceHash.
- Take the
settlementIdfrom the Retempo API response (or compute it withcomputeSettlementId). - Call
getSettlement(settlementId)on the RetempoSettlement contract via the Arc Testnet RPC (https://rpc.testnet.arc.network). - Verify that
existsistrueand the returned fields match your settlement.
referenceHash
The referenceHash is a 32-byte (bytes32) value that you generate and supply when submitting a settlement. It acts as a unique proof identifier for the onchain record and is one of the inputs used to compute the settlementId — which means a unique referenceHash guarantees a unique settlement ID.
Format: 0x followed by exactly 64 hexadecimal characters.
Example: 0xabc123...def456
You can generate a valid referenceHash in several ways. The example below uses ethers.js:
Option 1 is useful when you want to be able to reproduce the same
referenceHash from your own records. Option 2 is simpler and guarantees uniqueness, but you must store the value — you cannot regenerate it later.referenceHash you send is written verbatim to the contract.