diff --git a/inbox/payment-required.xml b/inbox/payment-required.xml index 236b61ac0..ab858e7c0 100644 --- a/inbox/payment-required.xml +++ b/inbox/payment-required.xml @@ -68,22 +68,25 @@

Protocols such as &xep0060; already acknowledge that services may require payment for operations (e.g., node subscriptions or item retrieval) but leave the payment mechanism out-of-band. This specification provides the in-band protocol to fulfill that need.

-

The design is informed by analogous protocols in the HTTP ecosystem: the long-reserved HTTP 402 Payment Required status code; the L402 protocol published by Lightning Labs, in which a client receives a WWW-Authenticate header containing a macaroon token and a Lightning invoice and presents a token-preimage credential after payment; and the x402 protocol published by Coinbase et al., in which a client receives an HTTP 402 response with a PAYMENT-REQUIRED header listing accepted payment schemes and retries with a PAYMENT-SIGNATURE header; and the Machine Payments Protocol (MPP) published by Stripe and Tempo, an IETF-tracked open standard for machine-to-machine payments that similarly uses HTTP 402 challenges with multi-method selection, machine-readable error codes, payment receipts, and cryptographic challenge binding. +

The design is informed by analogous protocols in the HTTP ecosystem: the long-reserved HTTP 402 Payment Required status code; the L402 protocol published by Lightning Labs, in which a client receives a WWW-Authenticate header containing a macaroon token and a Lightning invoice and presents a token-preimage credential after payment; the x402 protocol published by Coinbase et al., in which a client receives an HTTP 402 response with a PAYMENT-REQUIRED header listing accepted payment schemes and retries with a PAYMENT-SIGNATURE header; and the Machine Payments Protocol (MPP) published by Stripe and Tempo, an IETF-tracked open standard for machine-to-machine payments that similarly uses HTTP 402 challenges with multi-method selection, machine-readable error codes, payment receipts, and cryptographic challenge binding.

The conceptual parallels shared by all four are:

    -
  1. a service declines a request and presents payment instructions in-band;
  2. -
  3. the client completes payment and retries, optionally supplying a proof-of-payment token;
  4. -
  5. multiple simultaneously valid payment options MAY be presented so that the client can choose the most suitable scheme.
  6. +
  7. a service declines a request and presents payment instructions in-band
  8. +
  9. the client completes payment and retries, optionally supplying a proof-of-payment token
  10. +
  11. multiple simultaneously valid payment options MAY be presented so that the client can choose the most suitable scheme

This specification is payment-system agnostic. A service MAY require payment exclusively via bank transfer, distributed ledger, instant-settlement network, or any combination thereof. No payment system is privileged over any other at the protocol level. - Crucially, this specification does not enumerate or curate payment systems itself: each payment option is - expressed as a payment URI, and the payment system is identified by that URI's scheme (registered in the IANA URI Schemes registry, - and, for the payto scheme, the payment target types maintained externally per RFC 8905). Adding support for a new - payment network therefore requires no change to this document.

+ This specification also does not enumerate or curate payment systems. Each payment option is expressed as a payment URI, + and the payment system is identified by that URI's scheme. Adding support for a new payment network therefore requires no change + to this document.

+

+ The payment URI SHOULD be registered in the IANA URI Schemes registry, but there are URIs widely used by wallet and payment software + that are not yet registered, such the lightning: URI scheme, documented in the Lightning Network specifications (BOLT #11). + For the payto: scheme, which is IANA registered, the payment target types are maintained externally per RFC 8905.

@@ -91,9 +94,9 @@

End-to-end encryption (e.g. &xep0384;) protects the integrity of the URI in transit.

+ -

Clients MUST NOT automatically pay an invoice above a configurable amount threshold without explicit user confirmation. Implementations SHOULD default this threshold to zero (i.e., all payments require explicit user approval) and SHOULD allow the user to raise it. Automated agents operating within a pre-authorized budget MAY raise this threshold programmatically for their specific use case, but MUST NOT do so without the knowledge and consent of the account holder.

+

Clients MUST NOT automatically pay an invoice above a configurable amount threshold without explicit user confirmation. + Implementations SHOULD default this threshold to zero (i.e., all payments require explicit user approval) and SHOULD allow the user to raise it. + Automated agents operating within a pre-authorized budget MAY raise this threshold programmatically for their specific use case, + but MUST NOT do so without the knowledge and consent of the account holder.

+

Services MUST NOT include information in invoice metadata that would allow correlation of payments to real-world identities beyond what is required for the service function.

-

Lightning Network payment hashes are pseudonymous. However, a service that retains proof-of-payment preimages alongside session records can link a payment to the payer's JID. Services SHOULD minimize the identity information stored alongside consumed session records and SHOULD delete such records once the access grant has expired.

-

Traditional bank transfer options inherently reveal the payer's real name and account details to the payee, as this is a property of the underlying banking system. Clients SHOULD inform the user of this before initiating a bank transfer to a party the user has not previously transacted with.

+

Lightning Network payment hashes are pseudonymous. However, a service that retains proof-of-payment preimages alongside session records can link a payment to the payer's JID. + Services SHOULD minimize the identity information stored alongside consumed session records and SHOULD delete such records once the access grant has expired.

+

Traditional bank transfer options inherently reveal the payer's real name and account details to the payee, as this is a property of the underlying banking system. + Clients SHOULD inform the user of this before initiating a bank transfer to a party the user has not previously transacted with.

The 'session' value SHOULD NOT encode any information about the payer's identity or behavior.

@@ -646,11 +675,17 @@ upperroom-c4a1f902
  • urn:xmpp:payment:0#invoice-request
  • urn:xmpp:payment:0#receipt
  • -

    An entity that supports the error-flow portion of this protocol MUST advertise the feature 'urn:xmpp:payment:0'. An entity that additionally supports the proactive IQ-based invoice request MUST advertise 'urn:xmpp:payment:0#invoice-request'. An entity that supports emitting <receipt/> elements upon successful payment MUST advertise 'urn:xmpp:payment:0#receipt'.

    +

    An entity that supports the error-flow portion of this protocol MUST advertise the feature 'urn:xmpp:payment:0'. + An entity that additionally supports the proactive IQ-based invoice request MUST advertise 'urn:xmpp:payment:0#invoice-request'. + An entity that supports emitting <receipt/> elements upon successful payment MUST advertise 'urn:xmpp:payment:0#receipt'.

    -

    This specification deliberately does not establish an ®ISTRAR; registry of payment schemes, payment systems, or proof-of-payment formats. Curating payment systems is outside the XSF's area of expertise and is already handled by external bodies. Payment options are identified by their URI scheme via the IANA URI Schemes registry, and for the payto scheme by the payment target types maintained externally under RFC 8905. Proof types are declared per option by the issuing service and echoed by the payer (see The payment Element); the conventional values listed there are non-normative and their formats are defined by the relevant payment systems' own specifications.

    +

    This specification deliberately does not establish an ®ISTRAR; registry of payment schemes, payment systems, or proof-of-payment formats. + Curating payment systems is outside the XSF's area of expertise and is already handled by external bodies. Payment options are identified by their URI scheme, + ideally via the IANA URI Schemes registry, and for the payto scheme by the payment target types maintained externally under RFC 8905. + Proof types are declared per option by the issuing service and echoed by the payer (see The payment Element). + The conventional values listed there are non-normative and their formats are defined by the relevant payment systems' own specifications.