Report
The platform's payment reference, keyed by the ATR hash, read on the rail before it is recorded.
POST /report gives the door the platform's payment reference after payment, keyed by the ATR hash. The door reads a
reported payment on the rail before it records it; on a pairing with nothing to read, the seller's report is the
settlement.
The request
A report is either an outcome or a channel's close.
| Field | Outcome | Close | What to send |
|---|---|---|---|
atrHash | yes | yes | The record's H, in either case. |
pairing | yes | yes | The record's pairing. Another answers 409 report/pairing-mismatch. |
outcome | yes | paid or declined. | |
state | yes | closed. | |
reference | on paid | yes | The platform's payment reference as it comes, 1 to 256 characters with no control characters: the facilitator's transaction, the processor's payment id, the close transaction. |
network | no | no | The payment's network, or card for a card payment. |
chosen | on a record with no claim | no | The option the payment paid, as issued. The door takes the payment's read keys from it. |
request | with chosen, on x402 | The request commitment the option was issued for. | |
receipt | on a confirm-only channel pairing's paid | The receipt the channel's opening answered. |
The answers
| Answer | Meaning | What to do |
|---|---|---|
200 | The record as it now stands. | Done. |
202 with state: "settling" | Accepted; the door finishes the record. | Done: this is final for you. |
202 with state: "issued" | Accepted, and nothing was read yet. | Report again later. |
4xx | Refused. | Do not retry the same body. |
503 | Not available now. | Retry after Retry-After seconds. |
Retry until a 2xx or a 4xx. A report of money that moved is recorded even when it comes without a claim, and the record then states what is missing.
A report with nothing read yet
Vector CV7 reports a transaction the chain does not yet show as settled. The door records nothing, and the record
stays issued:
import type { RecordView, ReportOutcome } from "@integraledger/agentic-connectors";
import { } from "@integraledger/agentic-connectors";
const = .. ?? "https://seller.example/door";
const = .. ?? "";
async function (: string, : unknown): <Response> {
return (`${}${}`, {
: "POST",
: { : `Bearer ${}`, "content-type": "application/json" },
: .(),
});
}
const [, ] = ["CV7"]!.;
await ("/issue", !..);
const = !.. as unknown as ReportOutcome;
const = await ("/report", );
const = (await .()) as RecordView;
.(., ., ., ..);
if (. === 202 && . === "issued") .("nothing read yet: report again later");202 issued null null
nothing read yet: report again laterReporting without a claim
Where the pairing reads H from the payment but you did not claim it, send chosen (and request on x402) with the
report. The door reads the payment with the keys it takes from them, and the record states claimed: false.
Declined
outcome: "declined" records that the seller declined the payment. Nothing is read.
Closing a channel
{ "atrHash": "0x…", "pairing": "mpp/session/tempo", "state": "closed", "reference": "0x…" }The door reads the close with the keys recorded at the opening, and needs no chosen. See channels.
Last updated on