Create Purchase Intent
The createPurchaseIntent
MCP tool creates a Purchase Intent to retrieve a credential (virtual card, network token, etc.) enabling a purchase to be completed on behalf of the consumer. This tool provides the same functionality as the Create Purchase Intent API through the Model Context Protocol interface, enabling AI agents to create payment credentials.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
credentialType | string | Yes | The type of credential to create (virtual-card , network-token , pan ) |
paymentMethodId | string | Yes | The payment method ID to create credentials from |
mandates | array | Yes | Array of mandate objects for allowing credential use |
Mandate Object
Property | Required | Type | Description |
---|---|---|---|
type | true | string | The mandate type (maxAmount , merchantMcc , expirationDate , usageLimit ) |
value | true | string | The mandate value |
details | conditional | object | Details about the mandate (required for certain mandate types) |
Credential Types
Type | Description | Use Case |
---|---|---|
virtual-card | Full card details (PAN, expiry, CVC) | Online payments, card-present transactions |
network-token | Tokenized card with cryptogram | Secure online payments, mobile wallets |
pan | Primary Account Number only | Basic card processing |
Return Value
Returns an MCP tool result containing a purchase intent object:
{
"content": [
{
"type": "text",
"json": {
"id": "0b1ac700-c1a7-46b0-a166-809e5aac4dc3",
"entityId": "94c94330-94fd-4832-a106-e8474a274fe4",
"credentialType": "virtual-card",
"status": "active",
"card": {
"number": "2222030198005808",
"expirationMonth": "07",
"expirationYear": "2028",
"cvc": "211"
},
"createdAt": "2025-06-16T14:00:00Z",
"expiresAt": "2025-06-13T18:42:01Z"
}
}
]
}
Response Properties
Property | Type | Description |
---|---|---|
content | array | array of content returned. |
Purchase Intent
Property | Type | Description |
---|---|---|
id | string | The purchase intent id. |
entityId | string | The ID for the entity that owns the purchase intent. |
credentialType | string | The purchase intent credential type. |
status | string | The purchase intent status: active , verify or unavailable . |
card | Card Object | Details for a "virtual-card" type credential. |
token | Token Object | Details for a "network-token" type credential. |
createdAt | datetime | The purchase intent credential created date. |
expiresAt | datetime | The purchase intent expiration date for the credential. |
Virtual Card Object
Property | Type | Description |
---|---|---|
number | string | The card PAN. |
expirationMonth | string | Card expiration month in MM format. |
expirationYear | string | Card expiration year in YYYY format. |
cvc | string | Card security code. |
Token Object
Property | Type | Description |
---|---|---|
number | string | The token number. |
expirationMonth | string | Token expiration month in MM format. |
expirationYear | string | Token expiration year in YYYY format. |
cryptogram | string | The token cryptogram. |
Status Meanings
Status | Description | Action Required |
---|---|---|
active | Credential is ready for immediate use | None - use credential for transactions |
verify | Additional verification required | Use Verify Purchase Intent SDK |
unavailable | Credential type not available | Try different credential type |