-
Notifications
You must be signed in to change notification settings - Fork 128
docs(ack-pay): map ACK-Pay concepts to MPP and x402
#142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,46 @@ | ||||||||||||||||||||||||||||||||||||||
| # ACK-Pay Interoperability: MPP and x402 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| > **Status:** Non-normative. This page describes conceptual mappings only and does not add | ||||||||||||||||||||||||||||||||||||||
| > required fields to the `PaymentReceiptCredential` schema or change verifier semantics. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ACK-Pay already models the core primitives needed for agent commerce: a server-issued | ||||||||||||||||||||||||||||||||||||||
| payment request, client/payment-service execution, and a verifiable receipt. Two emerging | ||||||||||||||||||||||||||||||||||||||
| protocols — MPP and x402 — model similar flows around HTTP 402. This page maps ACK-Pay | ||||||||||||||||||||||||||||||||||||||
| concepts to both, so implementers can compose ACK with either without forcing | ||||||||||||||||||||||||||||||||||||||
| protocol-specific fields into the ACK core schema. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Concept mapping | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| | ACK-Pay | MPP | x402 | | ||||||||||||||||||||||||||||||||||||||
| | ------------------------ | --------------------------------- | -------------------------------------------- | | ||||||||||||||||||||||||||||||||||||||
| | Payment Request | Challenge | PaymentRequired / PaymentRequirements | | ||||||||||||||||||||||||||||||||||||||
| | Payment option | Payment method / payment request | scheme + network + requirements | | ||||||||||||||||||||||||||||||||||||||
| | Payment execution proof | Credential | PaymentPayload / Payment-Signature | | ||||||||||||||||||||||||||||||||||||||
| | Payment receipt VC | Receipt | Payment Response / signed receipt extension | | ||||||||||||||||||||||||||||||||||||||
| | Receipt issuer | Server / payment verifier | facilitator / resource server | | ||||||||||||||||||||||||||||||||||||||
| | Human oversight / policy | client/payment-service policy | client/facilitator policy layer | | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Where ACK adds value | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - **Rail-neutral core.** ACK-Pay does not depend on MPP or x402; either can sit underneath | ||||||||||||||||||||||||||||||||||||||
| an ACK-Pay flow as the execution rail. | ||||||||||||||||||||||||||||||||||||||
| - **Verifiable receipts.** ACK receipts are portable, signed credentials rather than a | ||||||||||||||||||||||||||||||||||||||
| protocol-specific response object. | ||||||||||||||||||||||||||||||||||||||
| - **Composable metadata.** Protocol-specific references (e.g. an x402 payment response | ||||||||||||||||||||||||||||||||||||||
| hash, or an MPP session id) can be carried as opaque extension metadata on the receipt | ||||||||||||||||||||||||||||||||||||||
| without changing the required schema fields. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Example: carrying an execution reference in receipt metadata | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ```json | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| "type": ["VerifiableCredential", "PaymentReceiptCredential"], | ||||||||||||||||||||||||||||||||||||||
| "credentialSubject": { | ||||||||||||||||||||||||||||||||||||||
| "paymentRequestToken": "...", | ||||||||||||||||||||||||||||||||||||||
| "paymentOptionId": "...", | ||||||||||||||||||||||||||||||||||||||
| "evidence": { | ||||||||||||||||||||||||||||||||||||||
| "executionRef": "x402:0xabc123...", | ||||||||||||||||||||||||||||||||||||||
| "settlementNetwork": "base" | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+38
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Place protocol-specific data under The existing receipt contract defines Proposed fix "credentialSubject": {
"paymentRequestToken": "...",
"paymentOptionId": "...",
- "evidence": {
- "executionRef": "x402:0xabc123...",
- "settlementNetwork": "base"
+ "metadata": {
+ "evidence": {
+ "executionRef": "x402:0xabc123...",
+ "settlementNetwork": "base"
+ }
}
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: agentcommercekit/ack
Length of output: 26076
🌐 Web query:
x402 official documentation PAYMENT-RESPONSE SettlementResponse optional signed receipt offer-receipt extension facilitator resource server💡 Result:
In the x402 protocol, the PAYMENT-RESPONSE header is a standardized HTTP header used by the resource server to communicate the outcome of a payment settlement to the client [1][2]. It contains a Base64-encoded SettlementResponse object [1][3][2]. The SettlementResponse schema includes the following fields: success (boolean), transaction (string; blockchain transaction hash), network (string; CAIP-2 format), errorReason (optional string), payer (optional string), amount (optional string), and extensions (optional object) [3][4]. The optional signed receipt is provided through the "offer-receipt" extension [5][6]. When this extension is active: 1. On 200 OK responses, the server signs a receipt confirming service delivery and payment receipt [5][6]. 2. This receipt is included in the extensions field of the SettlementResponse object, which is then transmitted via the PAYMENT-RESPONSE header [5][6][7]. 3. The receipt includes fields such as resourceUrl, payer, network, issuedAt, and an optional txHash [5][6][7]. A facilitator is an optional service that assists the resource server in verifying payment payloads and settling transactions on the blockchain [8][9]. The resource server may interact with a facilitator server by sending the payment payload and details to the facilitator's /verify or /settle endpoints [8]. The facilitator then performs the requested action (such as broadcasting the transaction) and returns a response, which the resource server uses to finalize the settlement and populate the PAYMENT-RESPONSE header [10][8]. Alternatively, servers may use in-process "self-facilitation" to perform these tasks locally [8][11].
Citations:
🌐 Web query:
site:docs.x402.org/extensions/offer-receipt x402 receipt issuer resource server signed receipt💡 Result:
The x402 protocol uses a specialized extension to handle signed offers and receipts, providing cryptographic proof of interaction between a resource server and a client [1]. In this workflow, the resource server's role regarding receipts is as follows: 1. Signed Offers (402 Responses): When the resource server returns a 402 Payment Required response, the Offer & Receipt extension signs an offer for each accepted payment scheme [1]. This offer commits to specific payment terms, including the network, amount, payment destination, and a validity timestamp [1]. 2. Signed Receipts (200 Responses): After a client completes the payment, the resource server issues a signed receipt upon returning a 200 OK response [1]. This receipt acts as confirmation of service delivery and includes details such as the resource URL, the payer's address, the network, and an issuance timestamp [1]. These receipts are included in the extensions field of the PAYMENT-RESPONSE header [1]. The extension supports verification via EIP-712 or JWS signatures, allowing clients to programmatically verify that the receipt was issued by the trusted resource server [1]. Implementation involves registering the offer-receipt extension with the x402ResourceServer instance on the backend [1].
Citations:
🏁 Script executed:
Repository: agentcommercekit/ack
Length of output: 28856
Separate receipt, settlement, and verification roles.
PAYMENT-RESPONSEcarries aSettlementResponse; only the optionaloffer-receiptextension adds a signed receipt. Map the x402 receipt issuer to the resource server and the settlement actor to the facilitator. Map the ACK receipt issuer toReceipt Service, not the server or payment verifier.evidenceundercredentialSubject.metadatain the example to match the documented receipt schema.🤖 Prompt for AI Agents
Source: MCP tools