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

ParameterTypeRequiredDescription
credentialTypestringYesThe type of credential to create (virtual-card, network-token, pan)
paymentMethodIdstringYesThe payment method ID to create credentials from
mandatesarrayYesArray of mandate objects for allowing credential use

Mandate Object

PropertyRequiredTypeDescription
typetruestringThe mandate type (maxAmount, merchantMcc, expirationDate, usageLimit)
valuetruestringThe mandate value
detailsconditionalobjectDetails about the mandate (required for certain mandate types)

Credential Types

TypeDescriptionUse Case
virtual-cardFull card details (PAN, expiry, CVC)Online payments, card-present transactions
network-tokenTokenized card with cryptogramSecure online payments, mobile wallets
panPrimary Account Number onlyBasic 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

PropertyTypeDescription
contentarrayarray of content returned.

Purchase Intent

PropertyTypeDescription
idstringThe purchase intent id.
entityIdstringThe ID for the entity that owns the purchase intent.
credentialTypestringThe purchase intent credential type.
statusstringThe purchase intent status: active, verify or unavailable.
cardCard ObjectDetails for a "virtual-card" type credential.
tokenToken ObjectDetails for a "network-token" type credential.
createdAtdatetimeThe purchase intent credential created date.
expiresAtdatetimeThe purchase intent expiration date for the credential.

Virtual Card Object

PropertyTypeDescription
numberstringThe card PAN.
expirationMonthstringCard expiration month in MM format.
expirationYearstringCard expiration year in YYYY format.
cvcstringCard security code.

Token Object

PropertyTypeDescription
numberstringThe token number.
expirationMonthstringToken expiration month in MM format.
expirationYearstringToken expiration year in YYYY format.
cryptogramstringThe token cryptogram.

Status Meanings

StatusDescriptionAction Required
activeCredential is ready for immediate useNone - use credential for transactions
verifyAdditional verification requiredUse Verify Purchase Intent SDK
unavailableCredential type not availableTry different credential type