Skip to main content
Version: v0.16.4

Gateway Decision Records

PEAC records evidence for gateway decisions: policy gate outcomes, x402 payment flows, and gateway export events. The gateway is the issuer; downstream systems can verify the record offline.

Terminal access decisions vs settlement-state records

This page covers the org.peacprotocol/gateway-export extension for the x402 payment-settlement state machine. For a portable signed record of a terminal gateway access decision (allow / deny / review), see the Gateway Decision Evidence guide, which composes the separate org.peacprotocol/access-decision record. They are different record families.

Gateway export records (v0.14.3+)​

The org.peacprotocol/gateway-export extension group (8 type URIs) covers the x402 payment-settlement and recovery state machine. Validate with validateGatewayExport() from @peac/schema:

  • org.peacprotocol/gateway-payment-submitted-observed
  • org.peacprotocol/gateway-settlement-unresolved-observed
  • org.peacprotocol/gateway-settlement-polling-observed
  • org.peacprotocol/gateway-settlement-confirmed-observed
  • org.peacprotocol/gateway-settlement-confirmed-late-observed
  • org.peacprotocol/gateway-settlement-failed-observed
  • org.peacprotocol/gateway-settlement-failed-orphaned-observed
  • org.peacprotocol/gateway-facilitator-timeout-observed

x402 payment flow records​

npm install @peac/adapter-x402
import { fromSettlementResponse } from '@peac/adapter-x402';
import { issue } from '@peac/protocol';

const carrier = fromSettlementResponse(settlementResponse.headers, settlementResponse.body);

const { jws } = await issue({
iss: 'https://gateway.example.com',
kind: 'evidence',
type: 'org.peacprotocol/gateway-settlement-confirmed-observed',
extensions: { 'org.peacprotocol/gateway': carrier },
privateKey,
kid,
});
res.setHeader('PEAC-Receipt', jws);

Supports x402 v1 and v2 dual-header format (X-PAYMENT-RESPONSE and PEAC-Receipt).

Runtime governance gate records​

The org.peacprotocol/runtime-governance extension group records policy evaluation and compliance gate outcomes. See the runtime governance profile.

What PEAC does NOT do​

PEAC records gateway evidence. It does not route requests, enforce policy, manage gateway processes, or settle payments. Those are the gateway's responsibility.