Skip to content

[draft] Authorization Intent#226

Open
brendanjryan wants to merge 2 commits intomainfrom
brendanryan-auth-intent
Open

[draft] Authorization Intent#226
brendanjryan wants to merge 2 commits intomainfrom
brendanryan-auth-intent

Conversation

@brendanjryan
Copy link
Copy Markdown
Collaborator

@brendanjryan brendanjryan commented Apr 8, 2026

Context

Adds the authorize intent — a transaction pattern where the payer grants the server permission to charge up to a specified amount within a time window, without immediate payment. This enabled delayed fulfillment, with spending caps.

Changes

Two new specs following the existing charge intent / Tempo charge method split:

  • draft-payment-intent-authorize-00 — Abstract intent semantics: request schema, credential requirements, authorization lifecycle, and error lifecycle
  • draft-tempo-authorize-00 — Tempo-specific implementation

Key design decisions

  • Two fulfillment types: Transaction (approve on-chain) vs key authorization (delegated signing key). The feePayer field determines which path is available — when true, key authorization is used; when false, the client must sign a full transaction.
  • Non-atomic: Unlike charge, authorize separates registration from collection. Multiple charges can occur against a single authorization.
  • Server-side accounting: Servers MUST maintain durable local state for remaining limits, independent of on-chain state, and decrement atomically with service delivery.
  • authorizationExpires vs expires: Challenge expiry and authorization expiry are distinct, in order to allow short lived challenges but long-lived authorizations. authorizationExpires MUST be strictly later than the challenge expires.

Open questions

Funds availability: With authorization keys on tempo, this method just gives users the "right" to capture funds, but does not guarantee funds can be captured (requires simulation). This makes this not a true auth+capture flow. To address this we could use a similar (same?) contract to what we use for sessions

Long-lived / incremental authorizations: Should we allow authorizations to be long lived and captured multiple times or only once? Should we allow the amount on the key to be increased?

My preference: I think multiple capture makes sense and mirrors card semantics. Incremental authorization (increasing auth amount) value is less clear for this flow and adds complexity.

Dual transaction type : Do we strictly need to offer both key authorization and transaction fulfillment flows? Is this unnecessary complexity for now?

My preference: Only have keyAuthorization

feePayer overloading: Currently feePayer: true implicitly requires key authorization and feePayer: false requires transaction fulfillment. Should we decouple fee sponsorship from credential type (e.g., add an explicit fulfillmentType field)?

This gets resolved if we remove the transaction flow above and only have keyAuthorization

Error signaling for limit exhaustion: The spec returns 402 with a fresh challenge when the authorization is exhausted. Should we add a structured error body or header (e.g., Payment-Error) so clients can distinguish "limit exhausted" from "authorization expired" from "authorization revoked" without guessing?

My preference: leaning "yes" here but still thinking

@brendanjryan brendanjryan changed the title Tighten authorize intent and Tempo semantics [draft] Authorization Intent Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Spec Preview

Spec Changed
draft-card-charge-00 Yes
draft-httpauth-payment-00 Yes
draft-lightning-charge-00 Yes
draft-lightning-session-00 Yes
draft-payment-discovery-00 Yes
draft-payment-intent-authorize-00 -
draft-payment-intent-charge-00 Yes
draft-payment-transport-mcp-00 Yes
draft-solana-charge-00 Yes
draft-stellar-charge-00 Yes
draft-stripe-charge-00 Yes
draft-tempo-authorize-00 -
draft-tempo-charge-00 Yes
draft-tempo-session-00 Yes

Download spec artifacts (HTML, TXT, XML, PDF)

- Fix IPR to noModificationTrust200902
- Remove citations from abstracts (RFC 7322)
- Remove TK placeholders
- Tighten amount field format (base-10 integer string)
- Add authorizationExpires > expires ordering constraint
- Add error responses section (402 for expired/exhausted/revoked)
- Add Idempotency-Key normative reference
- Replace undefined Payment-Authorization header mention
- Use definition list markup instead of markdown bold
- Normalize org: vs organization: in author blocks
- Make recipient conditionality explicit per fulfillment type
- Add ABNF appendix to method spec
- Add IANA per-method intent registration table
- Make chainId default normative
- Add did:pkh guidance matching charge spec
- Add caching guidance to security considerations
- Add EIP-20 informative reference
- Add informational caveat to recommended max windows
@brendanjryan brendanjryan marked this pull request as ready for review April 8, 2026 20:14
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 235f8c82c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

| Authorization expired | 402 Payment Required | Issue new challenge |
| Spending limit exhausted | 402 Payment Required | Issue new challenge |
| Authorization revoked | 402 Payment Required | Issue new challenge |
| Invalid credential | 401 Unauthorized | Reject credential |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use 402 for invalid payment credentials

The authorize intent error table assigns 401 Unauthorized to invalid credentials, but the base Payment auth scheme defines payment-credential validation failures as 402 with a fresh WWW-Authenticate: Payment challenge (and reserves 401 for non-payment auth failures). Implementations following this row will produce non-interoperable behavior where clients cannot properly retry payment challenges.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant