---
title: "The exact text to sign for a report that has not been written yet."
method: POST
path: "/v1/receipts/signing-message"
tags: ["Receipts"]
---

# The exact text to sign for a report that has not been written yet.

`POST /v1/receipts/signing-message`

## Request

- Base URL: `https://api.fidren.net`
- URL: `https://api.fidren.net/v1/receipts/signing-message`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Returns the statement to sign with the reporting address, together with the hash it commits to. Needed because the hash depends on the tip of that side's chain, which only the server knows. Writes nothing: asking what a report would hash to is not reporting it. The result is signed with `personal_sign` — a message signature, never a transaction. It moves no funds and authorises nothing else.

## Request body

- ReceiptRequest
  - `operation_id` string, required
  - `address` string, required: The reporting address — this side's own address. A signature, if given, must be produced by it.
  - `chain` 'base' | 'polygon', required
  - `side` 'PAYER' | 'PAYEE', required: Which end of the operation is reporting. Each side keeps its own hash chain, and the two accounts are compared rather than merged.
  - `counterparty_address` string, nullable: The other end, as this reporter names it.
  - `status` 'REQUESTED' | 'ACCEPTED' | 'DELIVERED' | 'CONCLUDED' | 'FAILED' | 'DISPUTED' | 'REFUNDED', required
  - `signature` string: Optional 65-byte `personal_sign` signature over the statement returned by POST /v1/receipts/signing-message. Stored only if it verifies against `address`; an unverifiable one is reported back and the receipt is recorded without it.
  - `amount_cents` integer, nullable
  - `currency` string
  - `tx_hash` string, nullable
  - `occurred_at` string, date-time, required

## Response `200`

The statement to sign.

- object
  - `message` string, required
  - `hash` string, required
  - `prev_hash` string, nullable, required
  - `instructions` string, required

## Other responses

- `400`: The request was rejected by validation.
- `401`: No usable access path. Either a key was presented and is not valid, or no key was presented, the free allowance is spent, and x402 charging is off. A presented key never falls back to the free tier or to being charged.
- `403`: The API key is valid, but its organization is not currently permitted to make this request. Do not rotate the key: it is not the problem.
- `409`: The receipt chain moved during the write; re-read and retry.
- `429`: Rate limit exceeded. Retry after the number of seconds in `Retry-After`.
- `503`: A required dependency is unavailable. Safe to retry.

---

[API](https://skmtc.dev/fidren/apis/fidren-decision-api.md) · [All operations](https://skmtc.dev/fidren/apis/fidren-decision-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fidren/apis/fidren-decision-api/revisions/d4b4dafcb345?raw)
