Skip to content
Integra Agentic Connectors

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.

FieldOutcomeCloseWhat to send
atrHashyesyesThe record's H, in either case.
pairingyesyesThe record's pairing. Another answers 409 report/pairing-mismatch.
outcomeyespaid or declined.
stateyesclosed.
referenceon paidyesThe 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.
networknonoThe payment's network, or card for a card payment.
chosenon a record with no claimnoThe option the payment paid, as issued. The door takes the payment's read keys from it.
requestwith chosen, on x402The request commitment the option was issued for.
receipton a confirm-only channel pairing's paidThe receipt the channel's opening answered.

The answers

AnswerMeaningWhat to do
200The 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.
4xxRefused.Do not retry the same body.
503Not 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:

report.ts
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 later

Reporting 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.

Edit on GitHub

Last updated on

On this page