acp-payment-handlers
Implement ACP payment handlers — pluggable payment method specifications including tokenized cards, seller-backed methods (gift cards, points, store credit), and handler negotiation. Use when adding payment methods or building custom payment handler support.
Best use case
acp-payment-handlers is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Implement ACP payment handlers — pluggable payment method specifications including tokenized cards, seller-backed methods (gift cards, points, store credit), and handler negotiation. Use when adding payment methods or building custom payment handler support.
Teams using acp-payment-handlers should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/acp-payment-handlers/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How acp-payment-handlers Compares
| Feature / Agent | acp-payment-handlers | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Implement ACP payment handlers — pluggable payment method specifications including tokenized cards, seller-backed methods (gift cards, points, store credit), and handler negotiation. Use when adding payment methods or building custom payment handler support.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# ACP Payment Handlers ## Before writing code **Fetch live docs**: 1. Web-search `site:github.com agentic-commerce-protocol rfcs payment_handlers` for the payment handlers RFC 2. Web-search `site:github.com agentic-commerce-protocol rfcs seller_backed` for seller-backed payment handler RFC 3. Fetch `https://developers.openai.com/commerce/specs/payment/` for payment data structures 4. Web-search `site:docs.stripe.com agentic-commerce payment handler` for Stripe's handler implementation ## Conceptual Architecture ### What Payment Handlers Are Payment handlers are **pluggable specifications** that define how a particular payment method works within ACP. Each PSP or merchant publishes handler specs, and agents/merchants negotiate which handlers they mutually support. This inverts the traditional integration model — instead of hardcoding payment methods into the protocol, handlers are discoverable and composable. ### Handler Identification Each handler has a reverse-DNS name and version: - `dev.acp.tokenized.card` — Tokenized credit/debit cards (Stripe SPT) - `dev.acp.seller_backed.saved_card` — Pre-stored cards on merchant - `dev.acp.seller_backed.gift_card` — Gift cards with number/PIN - `dev.acp.seller_backed.points` — Loyalty/rewards points - `dev.acp.seller_backed.store_credit` — Account balance/store credit ### Handler Structure Each payment handler spec defines: - **`id`** — Unique instance identifier within the session - **`name`** — Specification name in reverse-DNS format (e.g., `dev.acp.tokenized.card`) - **`version`** — Spec version - **`spec`** — URL to the handler specification - **`requires_delegate_payment`** — Whether the agent must call `/delegate_payment` (true for tokenized cards) - **`requires_pci_compliance`** — Whether PCI DSS scope is affected - **`psp`** — Which PSP processes this handler - **`config_schema`** — JSON Schema for merchant configuration - **`instrument_schemas`** — JSON Schema(s) for the payment instrument data the agent sends ### Tokenized Card Handler The primary handler — uses Stripe's delegated payment: 1. Agent provisions SPT via Stripe 2. Agent sends SPT as the instrument credential in `complete` 3. Merchant charges via Stripe using the SPT 4. `requires_delegate_payment: true` ### Seller-Backed Handlers These bypass the PSP — the merchant directly manages the payment: - **Saved card** — Customer has a card on file with the merchant - **Gift card** — Number + optional PIN - **Points** — Loyalty program balance - **Store credit** — Account balance - `requires_delegate_payment: false` - `requires_pci_compliance: false` (except saved cards) ### Handler Negotiation During capability negotiation: 1. Agent advertises supported payment handlers in `capabilities.payment.handlers[]` 2. Merchant responds with handlers they accept 3. Intersection determines available payment methods for the session 4. Agent picks one and provides the appropriate instrument data ### Payment Data Structure When completing a checkout, the agent provides: - `handler_id` — Which handler is being used - `instrument` — `type` + `credential` (shape defined by handler's instrument schema) - Optional `billing_address` ### Best Practices - Support multiple handlers to maximize conversion - Advertise all accepted handlers in capability negotiation - Validate instrument data against the handler's instrument schema - Handle handler-specific errors (e.g., insufficient points, expired gift card) - Log handler usage for payment method analytics Fetch the payment handlers RFC and instrument schemas from the GitHub repo for exact field definitions before implementing.
Related Skills
woo-payments
Build WooCommerce payment gateways — WC_Payment_Gateway, direct/redirect/hosted integrations, tokenization, subscriptions support, refunds, and PCI compliance. Use when creating custom payment method integrations.
ucp-payment-handlers
Implement UCP payment handlers — configure Google Pay, Shop Pay, or custom payment methods with tokenization, credential flow, and instrument schemas. Use when integrating payment processing into a UCP checkout.
spree-payments
Integrate payment gateways with Spree — PaymentMethod model, the v5.4+ PaymentSession provider-agnostic checkout flow, Stripe via `spree_stripe` (Apple/Google Pay, Link, Connect for marketplaces), Adyen via `spree_adyen`, PayPal via `spree_paypal_checkout`, StoreCredit / GiftCard as payment methods, refunds, payment state machine, and authoring a custom gateway. Use when wiring a payment integration, handling webhooks from a gateway, or debugging payment-state issues.
sf-payments
Implement Salesforce Commerce payments — Salesforce Payments (supports multiple processors including Stripe and Adyen), B2C payment adapters (JavaScript cartridge-based), B2B payment adapters (Apex-based), PCI compliance via tokenization, 3D Secure/SCA support, and payment method management. Use when implementing payment processing.
saleor-payments
Implement Saleor payment processing — transaction-based payment flow, payment Apps, sync webhook events, Stripe/Adyen patterns, and refunds. Use when building payment integrations.
medusa-payments
Implement Medusa v2 payment processing — payment module, provider abstraction, payment sessions, authorization/capture/refund lifecycle, and Stripe/PayPal integration. Use when adding payment providers.
bc-payments
Integrate BigCommerce payments — Payment Processing API, stored payment instruments, payment methods, server-side payment processing for headless, and PCI considerations. Use when building custom payment flows or processing payments programmatically.
ap2-payment-processor
Build an AP2 Merchant Payment Processor — the agent that constructs payment authorization messages, requests credentials from the Credentials Provider, processes payments, and returns receipts. Use when implementing the MPP role.
ap2-payment-mandate
Implement the AP2 Payment Mandate — the VDC shared with payment networks and issuers to signal AI involvement and user authorization. Use when building payment authorization flows, tokenization, and network integration.
acp-delegated-payment
Implement the ACP delegated payment flow and SharedPaymentToken (SPT) provisioning. Use when integrating with Stripe for payment tokenization, handling SPT lifecycle, or building the payment completion flow.
woo-testing
Test WooCommerce extensions — PHPUnit unit/integration tests, WP test suite, WooCommerce test helpers, E2E with Playwright, and WP-CLI test scaffolding. Use when writing tests for WooCommerce plugins or setting up a test environment.
woo-shipping
Build WooCommerce shipping methods — WC_Shipping_Method, shipping zones, shipping classes, rate calculation, tracking, and integration with carriers. Use when creating custom shipping integrations or configuring shipping logic.