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.

17 stars

Best use case

ucp-payment-handlers is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using ucp-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

$curl -o ~/.claude/skills/ucp-payment-handlers/SKILL.md --create-dirs "https://raw.githubusercontent.com/OrcaQubits/agentic-commerce-skills-plugins/main/dist/antigravity/ucp-agentic-commerce/.agent/skills/ucp-payment-handlers/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ucp-payment-handlers/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ucp-payment-handlers Compares

Feature / Agentucp-payment-handlersStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

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

# UCP Payment Handlers

## Before writing code

**Fetch live docs**:
- Google Pay handler: https://developers.google.com/merchant/ucp/guides/google-pay-payment-handler
- Shop Pay handler: Web-search `site:shopify.dev UCP Shop Pay payment handler`
- Payment architecture: https://ucp.dev/specification/overview/ (payment section)
- Reference types: https://ucp.dev/specification/reference/ (credential and instrument schemas)

## Conceptual Architecture

### Trust Triangle

```
Business <——> PSP <——> Credential Provider
```

- **Credential Provider** (Google Pay, Shop Pay): Issues encrypted payment tokens to the Platform
- **PSP** (Stripe, Adyen, etc.): Decrypts tokens, authorizes with card networks, settles funds
- **Business**: Configures which handlers/PSPs it accepts; receives credentials from Platform, forwards to PSP

**Critical security rule**: Credentials flow Platform → Business ONLY. Business MUST NEVER echo credentials back to the Platform.

### Payment Handler Concept

A payment handler is a **specification**, not an entity. It defines:
- `id`: Unique identifier for this payment handler instance
- `name`: Reverse-domain identifier (e.g., `com.google.pay`, `com.shopify.shop_pay`)
- `version`: Date-based version
- `spec`: URI to the handler specification
- `config`: Handler-specific configuration (merchant ID, accepted card networks, tokenization params)
- `config_schema`: JSON Schema defining the structure of the `config` object for this handler
- `instrument_schemas`: Schemas defining the shape of payment instruments this handler produces

Handlers are declared in the Business's discovery profile and echoed in checkout responses.

### Three Payment Processing Scenarios

1. **Digital Wallet** (Google Pay, Shop Pay): Platform acquires encrypted tokens from the wallet provider's API, sends to Business in `complete_checkout`.
2. **Direct Tokenization**: Platform calls PSP endpoint directly with Business's public key, gets network tokens.
3. **Autonomous Agent (AP2)**: Agent generates cryptographically-signed mandates proving user authorization — no human interaction needed. See the `ucp-ap2-mandates` skill.

### Credential Flow in Complete Checkout

When calling complete:
- `payment_data.instrument`: Describes the payment method (type, brand, last digits, billing address)
- `payment_data.credential`: The actual token/cryptogram (encrypted, handler-specific)

### Implementation Guidance

**Business side:**
1. Configure your PSP (Stripe, Adyen, etc.) and get merchant credentials
2. Build payment handler config for your discovery profile — fetch the exact format from the live handler spec
3. On `complete_checkout`, extract the credential and forward it to your PSP for authorization
4. Map PSP responses back to UCP checkout status (completed, or error with messages)

**Platform side:**
1. Read `payment.handlers` from the checkout response
2. Use the handler's `config` to initialize the payment provider SDK (e.g., Google Pay JS API)
3. Acquire a payment credential from the user
4. Send it in the `complete_checkout` call

Always verify the exact handler config schema from the live spec — payment handler configurations change frequently.

Related Skills

woo-payments

17
from OrcaQubits/agentic-commerce-skills-plugins

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.

spree-payments

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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-payment-handlers

17
from OrcaQubits/agentic-commerce-skills-plugins

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.

acp-delegated-payment

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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

17
from OrcaQubits/agentic-commerce-skills-plugins

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.