Acp delegated payment

From OrcaQubits/agentic-commerce-skills-plugins · View interactive version

Acp delegated payment is an AI agent skill from the GitHub repository 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.

How to use this skill

Skill file

ACP Delegated Payment & SharedPaymentToken

Before writing code

Fetch live docs:

  1. Fetch https://developers.openai.com/commerce/specs/payment/ for the delegated payment specification
  2. Fetch https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens for SPT implementation details
  3. Web-search site:docs.stripe.com agentic-commerce delegate payment for Stripe integration guide
  4. Web-search site:github.com agentic-commerce-protocol spec openapi delegate for the delegate payment OpenAPI spec

Conceptual Architecture

What Delegated Payment Solves

The agent facilitates purchases but must never see raw card data. Delegated payment creates a secure intermediary:

End-to-End Flow

Buyer → Agent: "Buy this"
Agent → PSP: POST /agentic_commerce/delegate_payment (credentials + constraints)
PSP → Agent: SharedPaymentToken (single-use, scoped)
Agent → Merchant: POST /checkout_sessions/{id}/complete (with SPT)
Merchant → PSP: Charge using SPT
PSP → Merchant: Payment confirmation
Merchant → Agent: Session status = completed + order

SPT Constraints (Allowance)

Each SharedPaymentToken is scoped with:

If any constraint is violated, the charge fails.

SPT Properties

3D Secure Flow

When the merchant returns authentication_required:

  1. Agent receives a 3DS challenge
  2. Agent performs 3DS authentication with the buyer
  3. Agent calls complete again with authentication_result containing:

SPT Webhook Events

| Event | Recipient | Purpose |

|-------|-----------|---------|

| shared_payment.granted_token.used | Merchant | Confirms SPT was consumed |

| shared_payment.granted_token.deactivated | Merchant | SPT revoked or expired |

| shared_payment.issued_token.used | Agent | Payment was processed |

| shared_payment.issued_token.deactivated | Agent | SPT invalidated |

PCI Considerations

Best Practices

Fetch the delegated payment OpenAPI spec and Stripe SPT docs for exact endpoint, request/response schemas, and error codes before implementing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.