x402 Offer Receipt Client (offer-receipt/client.ts)

x402 · typescript/packages/extensions/src/offer-receipt/client.ts · typescript · Apache-2.0
payments, pos, lang:typescript, tag:x402, tag:offers

Client-side utilities for extracting and verifying signed payment offers and receipts in x402 payment flows for audit trails.

// Source: https://github.com/x402-foundation/x402 | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Client-side utilities for extracting offers and receipts from x402 responses
 *
 * Provides utilities for clients who want to access signed offers and receipts
 * from x402 payment flows. Useful for verified reviews, audit trails, and dispute resolution.
 *
 * @see README.md for usage examples (raw and wrapper flows)
 * @see examples/typescript/clients/offer-receipt/ for complete example
 */

import { decodePaymentResponseHeader } from "@x402/core/http";
import type { PaymentRequired, PaymentRequirements, SettleResponse } from "@x402/core/types";
import { OFFER_RECEIPT, type O

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key