From ap2-agentic-payments
Implements AP2 Cart Mandate to create, sign, and verify carts binding merchant offers to user authorization for human-present checkouts.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin ap2-agentic-paymentsThis skill is limited to using the following tools:
**Fetch live docs**:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
Fetch live docs:
https://ap2-protocol.org/specification/ for the Cart Mandate schemasite:github.com google-agentic-commerce AP2 src/ap2/types mandate for the Python type definitionssite:github.com google-agentic-commerce AP2 samples cart mandate for sample implementationshttps://ap2-protocol.org/topics/core-concepts/ for Cart Mandate conceptual detailsThe Cart Mandate is the primary VDC for human-present transactions. It captures explicit user authorization for a specific set of items at specific prices, cryptographically binding the user's identity and consent to the exact transaction details.
The Merchant Endpoint creates and signs the Cart Mandate after receiving an Intent Mandate from the Shopping Agent. The merchant's signature guarantees fulfillment of the specified items at the specified prices.
Two signatures are required:
A CartMandate has two parts: contents (CartContents) and merchant_authorization (a JWT).
CartContents fields: id, user_cart_confirmation_required, payment_request (W3C PaymentRequest), cart_expiry, merchant_name.
Based on the specification, key fields include:
{
"contents": {
"id": "cart_identifier",
"user_cart_confirmation_required": true,
"payment_request": {
"method_data": [
{
"supportedMethods": "https://processor.example.com/pay",
"data": { ... }
}
],
"details": {
"id": "order_id",
"displayItems": [
{ "label": "Product Name", "amount": { "currency": "USD", "value": "29.99" } }
],
"total": {
"label": "Total",
"amount": { "currency": "USD", "value": "29.99" }
},
"shipping_options": null
},
"options": {
"requestPayerName": true,
"requestShipping": true,
"requestPayerEmail": false,
"requestPayerPhone": false
}
},
"cart_expiry": "2025-09-01T13:00:00Z",
"merchant_name": "Example Merchant"
},
"merchant_authorization": "<base64url-header>..<base64url-signature>"
}
Cart Mandates embed the W3C Payment Request API structure:
The merchant_authorization is a Base64url-encoded JWT using detached JWS format: <base64url-header>..<base64url-signature> (double dots — the payload is omitted because it is the canonicalized CartContents).
Supported signing algorithms: ES256, ES384, ES512 (ECDSA with P-256, P-384, P-521 curves).
JCS (RFC 8785) canonicalization is applied to the CartContents JSON before signing, ensuring deterministic serialization.
The JWT header MUST include alg and kid claims. The JWT payload includes: iss, aud, iat, exp, jti, cart_hash.
The merchant authorization guarantees:
The user signature proves:
Fetch the specification for exact Cart Mandate fields, signature format, and the payment_request schema before implementing.