Skip to Content
DocsProtocolR402 Profile Specification (v1)

R402 Profile Specification (v1)

The R402 profile defines a standard structure for representing rental and licensing requirements within the x402Β  payment protocol.
It extends the base x402 specification by introducing fields for usage tiers, access rights, and time-based validity.


🧩 Overview

R402 allows servers to sell temporary usage rights to digital resources using standard HTTP flows:

  1. Client requests the resource
  2. Server responds with 402 Payment Required and an R402 JSON payload
  3. Client pays and resubmits the request with proof of payment
  4. Server issues a signed receipt and returns the resource

All R402 exchanges are valid x402 transactions β€” they simply include additional semantic data for rentals and licensing.


🧠 Field Summary

FieldTypeRequiredDescription
standardstringβœ…Always "x402" β€” identifies the parent protocol.
profilestringβœ…Must equal "r402/v1".
usageobjectβœ…Defines rights, tiers, and durations.
usage.tiersarrayβœ…List of time-based access options (1d, 7d, 30d, etc.).
usage.modesarrayoptionalRights such as "view", "remix", "commercial-lite".
pay_toobjectβœ…Destination for payments (address + chain).
facilitatorstringoptionalEndpoint for verifying and signing receipts.
noncestringoptionalUnique identifier for request replay protection.
expires_atstring (ISO-8601)optionalWhen the requirement itself becomes invalid.

πŸ“¦ Example: Server β†’ Client (402 Response)

HTTP/1.1 402 Payment Required Content-Type: application/json X-402-Version: 1
{ "standard": "x402", "profile": "r402/v1", "resource": "nft:solana:mint:9abc...xyz", "usage": { "modes": ["view", "remix"], "tiers": [ { "id": "1d", "label": "1 Day Access", "duration_seconds": 86400, "price": { "amount": "0.50", "currency": "USDC", "chain": "solana" } }, { "id": "7d", "label": "1 Week Access", "duration_seconds": 604800, "price": { "amount": "2.00", "currency": "USDC", "chain": "solana" } } ] }, "pay_to": { "address": "SoLWallet111...", "chain": "solana" }, "facilitator": "https://facilitator.fx402.xyz/settle", "nonce": "bf1c...e7", "expires_at": "2025-10-30T00:00:00Z" }

πŸ’³ Example: Client β†’ Server (Payment Submission)

After the user selects a tier and pays, the client retries with proof:

{ "standard": "x402", "profile": "r402/v1", "tier_id": "7d", "payment_proof": { "chain": "solana", "currency": "USDC", "tx": "4sJQd2cA...FyW" } }

The server (or facilitator) validates the proof, delivers the resource, and issues a receipt.


🧾 Example: Receipt Object

{ "profile": "r402/v1", "receipt": { "resource": "nft:solana:mint:9abc...xyz", "tier_id": "7d", "paid": { "amount": "2.00", "currency": "USDC" }, "valid_from": "2025-10-29T00:00:00Z", "valid_until": "2025-11-05T00:00:00Z", "jwt": "<signed JWT>" } }

πŸ” Versioning & Compatibility

  • Current version: r402/v1
  • Future updates may extend usage.modes or add verification primitives.
  • Servers should include a profile field to ensure forward compatibility.

Last updated on