Alipay Trust
PendingAlipay Trust Protocol — Alipay (Ant Group)
Overview
The Alipay Trust Protocol is Alipay's agentic commerce framework that extends MCP with delegated payment authorization. It enables AI agents to transact on behalf of users through Alipay's rails, covering the 1.3 billion Alipay users across China and Southeast Asia. The protocol uses Alipay Agent Tokens — delegated authorization credentials that allow agents to make payments within pre-approved budgets.
How It Works
The Alipay Trust Protocol uses a delegated authorization model. A user (the principal) grants an AI agent an Alipay Agent Token through the Alipay authorization flow. The token carries embedded spending limits, time constraints, merchant category restrictions, and the user's payment preference (balance, credit, or Huabei installments).
When the agent calls a service, it presents the Agent Token in the x-alipay-agent-token header. The service verifies the token with Alipay's Open Platform API, which confirms the token's validity, checks spending limits, and authorizes the charge. Payment is settled through Alipay's existing rails.
The protocol supports multi-currency settlement (CNY, USD, EUR) and integrates with Alipay's existing merchant infrastructure, giving service providers access to Alipay's massive user base without separate payment integration.
How SettleGrid Integrates
SettleGrid supports Alipay Agent Tokens as a payment method. When an agent presents an Alipay Agent Token, SettleGrid validates the token structure and (when Alipay partnership credentials are configured) verifies it with Alipay's Open Platform API. The tool invocation is metered and the developer receives payouts through Stripe Connect or Alipay merchant settlement. Requires ALIPAY_APP_ID and ALIPAY_PRIVATE_KEY environment variables for full API verification.
Key Specs
| Protocol | Alipay Trust — Alipay Trust Protocol |
| Backer | Alipay (Ant Group) |
| Detection Header | x-alipay-agent-token / Authorization: Bearer alipay_* |
| Identity Type | alipay-agent-token |
| Payment Type | alipay-rails |
| Status | Pending |
Code Example
Here is how a developer's tool works with Alipay Trust via SettleGrid:
// Agent paying for a SettleGrid tool via Alipay Trust Protocol
const response = await fetch('https://settlegrid.ai/api/proxy/market-research', {
method: 'POST',
headers: {
'x-alipay-agent-token': 'alipay_agent_token_abc123...',
'x-alipay-session-id': 'session_xyz789',
'Content-Type': 'application/json',
},
body: JSON.stringify({ market: 'consumer-electronics', region: 'asia-pacific' }),
})
// Developer side — zero config needed:
import { settlegrid } from '@settlegrid/mcp'
const sg = settlegrid.init({
toolSlug: 'market-research',
pricing: { defaultCostCents: 15 },
// Alipay Agent Tokens are accepted automatically
// alongside all other payment protocols
})Start monetizing with SettleGrid
Free forever — 50,000 ops/month, progressive take rate. Add billing to your Alipay Trust tool in under 5 minutes.
Get Started Free