> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.americanexpress.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.americanexpress.ferndocs.com/_mcp/server.

# Update an intent

PUT https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/{intentId}
Content-Type: application/json

Updates an existing intent associated with an enrolled account. This API supports a multi-step flow when additional authentication is required:The initial request submits updated intent details for validation and risk assessment.If step-up authentication is required, a follow-up request must be made with the intent identifier and step-up verification details.Intent updates are limited to supported parameters such as maximum amount and expiration. To modify other attributes, the existing intent must be cancelled and a new intent created.

Reference: https://developer.americanexpress.ferndocs.com/payment-services/agentic-commerce/api-reference/intent/update-intent

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Exchange your API key and secret for a bearer token, then send it as `Authorization: Bearer <token>`.

## Servers

- `https://apisandboxm.americanexpress.com` (sandbox, default)
- `https://apigwm.americanexpress.com` (production)

## Request

### Path parameters

- `intentId` (string, required) — Intent identifier

### Headers

- `Authorization` (string, required) — The OAuth authorization header generated as prescribed in the Oauth 2.0 guide
- `trackingId` (string, required) — A unique identifier for request tracking.
- `agentId` (string, required) — Agent's unique identifier.

### Body (application/json)

This endpoint expects an UpdateIntentsRequest.

- `UpdateIntentsRequest`

## Response

### 200

Successful response

- `IntentsResponse`

## Errors

### 400 Bad Request Error

Bad request

- `error` (ErrorInvalidFieldsResponseError, required)

### 401 Unauthorized Error

Unauthorized

- `any`

### 404 Not Found Error

Resource not found

- `any`

### 422 Unprocessable Entity Error

Unprocessable entity

- `error` (ErrorBusinessExceptionResponseError, required)

### 500 Internal Server Error

Service error

- `error` (ErrorSystemDownResponseError, required)

## Types

### UpdateIntentsRequest0

The initial request for update (before step-up verification)

- `enrollmentId` (string, required) — A unique identifier for the enrolled account.
- `prompt` (PromptDetails, required) — The natural language context associated with the intent.
- `expirationTs` (datetime, required) — The intent expiration date and time in ISO 8601 format
- `spendControl` (SpendControl, required) — Constraints applied to the payment method.
- `agent` (Agent, required) — Information about the agent facilitating the commerce transaction.
- `shipment` (ShipmentDetails, required) — Shipping and delivery information associated with the purchase. For digital goods, deliveryEmail is required. For physical goods, shippingAddress with postalCode is required.
- `risk` (IntentsRisk, required)
- `purchaseDecision` (enum, required) — Indicates whether a purchase is executed with explicit Card Member approval at the time of transaction or delegated to an Agent for autonomous execution.
  - Allowed values: `NON-DELEGATED`, `DELEGATED`
- `orderContext` (OrderContext, optional) — Order-level details including merchants, items, and purchase context.
- `maxAllowedTransactions` (string, optional) — Indicates the maximum allowed transactions authorized by the user to complete the purchase.
- `user` (IntentsUser, optional) — The Customer identity information associated with the request.

### UpdateIntentsRequest1

The follow-up request after completing step-up verification.

- `enrollmentId` (string, required) — The enrolled account's unique identifier
- `stepUpVerification` (StepUpVerification, required) — The step-up verification details for completing authentication. Required when submitting a step-up challenge response. This object will depend on the challenge type returned in the initial API response when the step-up flow is initiated.

### IntentsResponseBeforeStepUp

The response returned when additional authentication is required to proceed with the intent.

- `stepUpAuthenticationRequired` (enum, required) — Indicates whether additional authentication is required.
  - Allowed values: `YES`, `NO`
- `enrollmentId` (string, required) — A unique identifier for the enrolled account.
- `intentId` (string, required) — A unique identifier for the intent.
- `intentStatus` (enum, required) — The current status of the intent.
  - Allowed values: `PENDING_STEP_UP`
- `stepUpSessionId` (string, required) — The identifier for the step-up session associated with the intent.
- `availableChallenges` (list of AvailableChallengesItems, required) — The authentication challenges available to complete step-up verification.

### IntentsResponseAfterStepUp

The response returned after successful step-up authentication for the intent.

- `enrollmentId` (string, required) — A unique identifier for the enrolled account.
- `intentId` (string, required) — A unique identifier for the intent.
- `intentStatus` (enum, required) — The current status of the intent.
  - Allowed values: `ACTIVE`
- `proofOfIntent` (string, required) — A signed JSON web token associated with the intent.

### ErrorInvalidFieldsResponseError

- `code` (string, required) — An error code that is returned when request validation fails.
- `description` (string, required) — An error description that is returned when request validation fails.
- `type` (enum, required)
  - Allowed values: `USER_EXCEPTION`
- `param` (string, optional) — The parameter that caused the error, if applicable

### ErrorBusinessExceptionResponseError

- `code` (string, required) — An error code returned when a business rule validation fails.
- `description` (string, required) — An error description returned when a business rule validation fails.
- `type` (enum, required)
  - Allowed values: `BUSINESS_EXCEPTION`

### ErrorSystemDownResponseError

- `code` (enum, required)
  - Allowed values: `20001`
- `description` (enum, required)
  - Allowed values: `Internal server error`
- `type` (enum, required)
  - Allowed values: `SYSTEM_EXCEPTION`

### PromptDetails

The natural language context associated with the intent.

- `promptSummary` (string, required) — A summary of the purchase intent derived from user input.
- `nlpConfidence` (float, optional) — The confidence score associated with the interpreted intent. Values range from 0 to 1, where higher values indicate greater confidence in the prediction.

### SpendControl

Constraints applied to the payment method.

- `maxAmount` (string, required) — The maximum amount that can be charged using the payment method.
- `currency` (string, required) — The currency code for the amount, in ISO 4217 format.
- `expirationTs` (datetime, optional) — The expiration timestamp for the payment method.

### Agent

Information about the agent facilitating the commerce transaction.

- `llmVersion` (string, required) — The version of the language model used by the agent.
- `llmPlatform` (enum, required) — The platform hosting the language model used by the agent.
  - Allowed values: `OPEN_AI`
- `agentName` (string, required) — The name of the agent or application initiating the request.

### ShipmentDetails

Shipping and delivery information associated with the purchase. For digital goods, deliveryEmail is required. For physical goods, shippingAddress with postalCode is required.

- `shippingEmail` (string, optional) — The email address associated with the order.
- `shippingMethod` (enum, optional) — The shipping method selected for the order.
  - Allowed values: `SAME_DAY`, `OVERNIGHT`, `EXPEDITED`, `STANDARD`
- `shippingPhoneNumber` (string, optional) — The contact phone number associated with the order.
- `shippingAddress` (ShippingAddress, optional) — The shipping address for physical goods. Required when the item is classified as a physical good.
- `deliveryEmail` (string, optional) — The email address for delivery notifications and confirmations. Required when the item is classified as a digital good.

### IntentsRisk

- `device` (IntentsDeviceRisk, required) — Device-level risk signals associated with the request.
- `order` (IntentsOrderRisk, required) — Order-level risk signals associated with the request.
- `account` (IntentsAccountRisk, optional) — Account-level risk signals associated with the request.
- `metadata` (IntentsRiskMetadata, optional) — A generic risk metadata container allowing arbitrary string key-value pairs. Keys must be strings and values must be strings.

### OrderContext

Order-level details including merchants, items, and purchase context.

### IntentsUser

The Customer identity information associated with the request.

### StepUpVerification

The step-up verification details for completing authentication. Required when submitting a step-up challenge response. This object will depend on the challenge type returned in the initial API response when the step-up flow is initiated.

### AvailableChallengesItems

### ShippingAddress

Conditional. Required when the purchased item is classified as a physical good. Shipping address associated with the item(s) being purchased.

- `addressLine1` (string, optional) — The first line of the address.
- `addressLine2` (string, optional) — The second line of the address.
- `city` (string, optional) — The city of the address.
- `state` (string, optional) — The state of the address.
- `country` (string, optional) — The country of the address in ISO 3166-1 alpha-2 format.
- `postalCode` (string, optional) — The Postal Code of the address.

### IntentsDeviceRisk

Device-level risk signals associated with the request.

- `deviceId` (string, required) — A unique identifier for device used; stays consistent between sessions.
- `ipAddress` (string, required) — The IP address of the device.
- `deviceName` (string, optional) — Recognizable device name identifier for device used; stays consistent between sessions.
- `deviceType` (enum, optional) — The type of the device used
  - Allowed values: `Phone`, `Tablet`, `Watch`, `Wearable`, `Other`
- `deviceRiskScore` (string, optional) — A risk score provided by the Partner indicating the assessed risk level of the device, on a scale of 1-5 (1 = Very Low, 2 = Low, 3 = Medium, 4 = High, 5 = Very High).
- `deviceTenure` (double, optional) — The number of weeks since the User first used this device on this account
- `tlsFingerprint` (string, optional) — The fingerprint of the device.
- `location` (IntentsDeviceRiskLocation, optional) — The location of the device.

### IntentsOrderRisk

Order-level risk signals associated with the request.

- `includesGiftCard` (enum, required) — Indicates whether the purchase includes at least one gift card item.
  - Allowed values: `YES`, `NO`

### IntentsAccountRisk

Account-level risk signals associated with the request.

- `panTenureOnFile` (double, optional) — The number of weeks since the User added the Card account details on file.
- `accountRiskScore` (string, optional) — A risk score provided by the Partner indicating the assessed risk level of the account, on a scale of 1-5 (1 = Very Low, 2 = Low, 3 = Medium, 4 = High, 5 = Very High).
- `recentSecurityActivity` (string, optional) — Time elapsed (in days) since the most recent password or two-factor authentication change.
- `mostRecentAccountPaymentMethodChangeActivity` (double, optional) — The number of days since the User changed his recent payment method.
- `partnerStepUp` (enum, optional) — A value to determine if the user has been stepped-up by the agent.
  - Allowed values: `YES`, `NO`
- `agentAccountLocale` (string, optional) — The locale identifier (e.g., `en-US`, `en-GB`) representing the region of the agent's financial account. Used to determine currency, payment rails, formatting, and compliance behavior.

### IntentsRiskMetadata

A generic risk metadata container allowing arbitrary string key-value pairs. Keys must be strings and values must be strings.

### OrderContext0

- `items` (list of ItemsItems, optional) — Line items associated with the order. Typically used for merchandise, retail, or electronics purchases.

### OrderContext1

- `airlineItems` (list of AirlineItems, optional) — Line items associated with airline bookings.

### Email Address

- `email` (string, optional) — The Customer's email address in RFC 5322 format.

### Phone Number

- `phone` (string, optional) — The Customer's phone number in international format, starting with + followed by a string of digits between zero and nine with a minimum length of 11 digits.

### The response object for SafeKey<sup>&reg;</sup> authentication challenge

This object will depend on the challenge type returned in the initial API response when the step-up flow is initiated.

- `safeKeyAuthenticationResponse` (StepUpVerificationOneOf0SafeKeyAuthenticationResponse, required) — The result of SafeKey® authentication.

### The response object for issuer surface authentication challenge

- `issuerSurfaceAuthenticationResponse` (StepUpVerificationOneOf1IssuerSurfaceAuthenticationResponse, required) — The result of issuer surface authentication for step-up integration.

### The response object for SECURE_PUSH authentication challenge

- `securePushAuthenticationResponse` (StepUpVerificationOneOf2SecurePushAuthenticationResponse, required) — Confirmation when authentication is complete using SECURE_PUSH

### The response object for SMS_OTP or EMAIL_OTP authentication challenge

- `validateAuthenticationCode` (StepUpVerificationOneOf3ValidateAuthenticationCode, required) — The one-time passcode entered by the user for step-up verification using SMS_OTP or EMAIL_OTP.

### AvailableChallengesItems0

- `type` (enum, required) — The authentication method.
  - Allowed values: `ISSUER_SURFACE`
- `issuerSurface` (AvailableChallengesItemsOneOf0IssuerSurface, required) — Issuer surface authentication details.

### AvailableChallengesItems1

- `type` (enum, required) — The authentication method.
  - Allowed values: `SECURE_PUSH`
- `securePushAuthentication` (AvailableChallengesItemsOneOf1SecurePushAuthentication, required) — Secure push authentication details.

### AvailableChallengesItems2

- `type` (enum, required) — The authentication method.
  - Allowed values: `SAFEKEY`
- `safeKeyAuthentication` (AvailableChallengesItemsOneOf2SafeKeyAuthentication, required) — SafeKey® authentication details.

### AvailableChallengesItems3

- `type` (enum, required) — The authentication method.
  - Allowed values: `SMS_OTP`
- `channelId` (string, required) — A unique identifier of the phone channel to deliver OTP.
- `value` (string, required) — The masked phone number where the OTP will be delivered.

### AvailableChallengesItems4

- `type` (enum, required) — The authentication method.
  - Allowed values: `EMAIL_OTP`
- `channelId` (string, required) — A unique identifier of the email channel to deliver OTP.
- `value` (string, required) — The masked email address where the OTP will be delivered.

### IntentsDeviceRiskLocation

The location of the device.

- `longitude` (string, optional) — The longitude coordinates of the device.
- `latitude` (string, optional) — The latitude coordinates of the device.

### ItemsItems

The details of an individual item in the order.

- `itemId` (string, required) — A unique identifier for the item within the order.
- `name` (string, required) — The name of the item.
- `isGiftCard` (enum, required) — Indicates whether the item is a gift card.
  - Allowed values: `YES`, `NO`
- `merchantId` (integer, optional) — The identifier of the Merchant associated with the item.
- `unitAmount` (string, optional) — The unit price of the item.
- `currency` (string, optional) — The currency code for the item price, in ISO 4217 format. Required when \<samp>unitAmount\<samp> is provided.
- `quantity` (integer, optional) — The quantity of the item.
- `condition` (string, optional) — The condition of the item, such as new, refurbished, or used.
- `category` (string, optional) — The category associated with the item.
- `brand` (string, optional) — The brand associated with the item.
- `imageLink` (string, optional) — The main product image URL.
- `isRefundable` (enum, optional) — Indicates whether the item is refundable.
  - Allowed values: `YES`, `NO`
- `isRecurBill` (enum, optional) — Indicates whether the item represents a recurring purchase.
  - Allowed values: `YES`, `NO`
- `purchaseCriteria` (list of PurchaseCriteriaItems, optional) — Constraints or preferences associated with the item.
- `metadata` (ItemsItemsMetadata, optional) — A generic item metadata container allowing arbitrary string key-value pairs. Keys must be strings and values must be strings.

### AirlineItems

The details of an individual airline booking.

- `itemId` (string, required) — A unique identifier for the item within the order.
- `passengerName` (string, required) — The name of the passenger associated with the booking.
- `origin` (string, optional) — The origin airport, represented as a three-letter IATA code.
- `destination` (string, optional) — The destination airport, represented as a three-letter IATA code.
- `carrier` (string, optional) — The airline carrier for the booking.
- `isInsuranceOpted` (enum, optional) — Indicates whether travel insurance has been selected.
  - Allowed values: `YES`, `NO`
- `isRefundable` (enum, optional) — Indicates whether the booking is refundable.
  - Allowed values: `YES`, `NO`
- `unitAmount` (string, optional) — The price of the booking, per unit.
- `currency` (string, optional) — The currency code for the amount, in ISO 4217 format.
- `purchaseCriteria` (list of PurchaseCriteriaItems, optional) — Constraints or preferences associated with the booking.
- `metadata` (AirlineItemsMetadata, optional) — A generic airlineItem metadata container allowing arbitrary string key-value pairs. Keys must be strings and values must be strings.

### StepUpVerificationOneOf0SafeKeyAuthenticationResponse

The result of SafeKey® authentication.

- `riskToken` (string, required) — The encrypted risk token used for SafeKey® authentication.

### StepUpVerificationOneOf1IssuerSurfaceAuthenticationResponse

The result of issuer surface authentication for step-up integration.

- `authenticationToken` (string, required) — The encrypted authentication token used for authentication using ISSUER_SURFACE.

### StepUpVerificationOneOf2SecurePushAuthenticationResponse

Confirmation when authentication is complete using SECURE_PUSH

- `authenticationToken` (string, required) — The encrypted authentication token used for authentication using SECURE_PUSH

### StepUpVerificationOneOf3ValidateAuthenticationCode

The one-time passcode entered by the user for step-up verification using SMS_OTP or EMAIL_OTP.

- `value` (string, required) — The one-time passcode entered by the user

### AvailableChallengesItemsOneOf0IssuerSurface

Issuer surface authentication details.

- `url` (string, required) — URL for initiating issuer surface authentication.
- `authenticationToken` (string, required) — The encrypted authentication token associated with the authentication request.

### AvailableChallengesItemsOneOf1SecurePushAuthentication

Secure push authentication details.

- `authenticationToken` (string, optional) — The encrypted authentication token associated with the authentication request.

### AvailableChallengesItemsOneOf2SafeKeyAuthentication

SafeKey® authentication details.

- `riskToken` (string, required) — The encrypted risk token associated with the authentication request.
- `messageCategory` (enum, required) — SafeKey® message category.
  - Allowed values: `01`, `02`
- `threeDSRequestorAuthenticationInd` (enum, required) — SafeKey® authentication indicator.
  - Allowed values: `81`, `82`

### PurchaseCriteriaItems

- `type` (enum, optional) — The type of criteria applied to the item.
  - Allowed values: `PRICE`, `DATE`
- `fromDate` (datetime, optional) — Start of the date range for fulfillment. Required when the type is DATE.
- `toDate` (datetime, optional) — End of the date range for fulfillment. Required when the type is DATE.
- `pricePreference` (enum, optional) — Price preference for the item. Required when the type is PRICE.
  - Allowed values: `MINIMUM_PRICE`, `BETWEEN_RANGE`, `MAXIMUM_PRICE`
- `maxAmount` (string, optional) — Maximum price for the item. Required when the pricePreference is BETWEEN\_RANGE.
- `minAmount` (string, optional) — Minimum price for the item. Required when the pricePreference is BETWEEN\_RANGE.
- `currency` (string, optional) — The currency code for the price values, in ISO 4217 format.
- `isShippingIncluded` (enum, optional) — Indicates whether shipping cost is included in the price.
  - Allowed values: `YES`, `NO`
- `dependentItems` (list of DependentItemsItems, optional) — Dependencies that must be satisfied before the item can be purchased.

### ItemsItemsMetadata

A generic item metadata container allowing arbitrary string key-value pairs. Keys must be strings and values must be strings.

### AirlineItemsMetadata

A generic airlineItem metadata container allowing arbitrary string key-value pairs. Keys must be strings and values must be strings.

### DependentItemsItems

- `dependentItemId` (string, optional) — The identifier of the item that this item depends on.

## Examples

### The response to an intent before completing step-up verification.

**Response**

```json
{
  "availableChallenges": {
    "0": {
      "issuerSurface": {
        "authenticationToken": "string",
        "url": "string"
      },
      "type": "ISSUER_SURFACE"
    }
  },
  "enrollmentId": "string",
  "intentId": "string",
  "intentStatus": "PENDING_STEP_UP",
  "stepUpAuthenticationRequired": "YES",
  "stepUpSessionId": "string"
}
```

**SDK Code**

```python The response to an intent before completing step-up verification.
import requests

url = "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

headers = {
    "Authorization": "Bearer <token>",
    "agentId": "agentId",
    "trackingId": "trackingId"
}

response = requests.put(url, headers=headers)

print(response.json())
```

```javascript The response to an intent before completing step-up verification.
const url = 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', agentId: 'agentId', trackingId: 'trackingId'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go The response to an intent before completing step-up verification.
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("agentId", "agentId")
	req.Header.Add("trackingId", "trackingId")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby The response to an intent before completing step-up verification.
require 'uri'
require 'net/http'

url = URI("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["agentId"] = 'agentId'
request["trackingId"] = 'trackingId'

response = http.request(request)
puts response.read_body
```

```java The response to an intent before completing step-up verification.
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")
  .header("Authorization", "Bearer <token>")
  .header("agentId", "agentId")
  .header("trackingId", "trackingId")
  .asString();
```

```php The response to an intent before completing step-up verification.
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'agentId' => 'agentId',
    'trackingId' => 'trackingId',
  ],
]);

echo $response->getBody();
```

```csharp The response to an intent before completing step-up verification.
using RestSharp;

var client = new RestClient("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("agentId", "agentId");
request.AddHeader("trackingId", "trackingId");
IRestResponse response = client.Execute(request);
```

```swift The response to an intent before completing step-up verification.
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "agentId": "agentId",
  "trackingId": "trackingId"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### The response to an intent after completing step-up verification.

**Response**

```json
{
  "enrollmentId": "string",
  "intentId": "string",
  "intentStatus": "ACTIVE",
  "proofOfIntent": "string"
}
```

**SDK Code**

```python The response to an intent after completing step-up verification.
import requests

url = "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

headers = {
    "Authorization": "Bearer <token>",
    "agentId": "agentId",
    "trackingId": "trackingId"
}

response = requests.put(url, headers=headers)

print(response.json())
```

```javascript The response to an intent after completing step-up verification.
const url = 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', agentId: 'agentId', trackingId: 'trackingId'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go The response to an intent after completing step-up verification.
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("agentId", "agentId")
	req.Header.Add("trackingId", "trackingId")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby The response to an intent after completing step-up verification.
require 'uri'
require 'net/http'

url = URI("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["agentId"] = 'agentId'
request["trackingId"] = 'trackingId'

response = http.request(request)
puts response.read_body
```

```java The response to an intent after completing step-up verification.
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")
  .header("Authorization", "Bearer <token>")
  .header("agentId", "agentId")
  .header("trackingId", "trackingId")
  .asString();
```

```php The response to an intent after completing step-up verification.
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'agentId' => 'agentId',
    'trackingId' => 'trackingId',
  ],
]);

echo $response->getBody();
```

```csharp The response to an intent after completing step-up verification.
using RestSharp;

var client = new RestClient("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("agentId", "agentId");
request.AddHeader("trackingId", "trackingId");
IRestResponse response = client.Execute(request);
```

```swift The response to an intent after completing step-up verification.
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "agentId": "agentId",
  "trackingId": "trackingId"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Submit updated intent for validation and risk assessment.

**Request**

```json
{
  "agent": {
    "agentName": "NexusAI",
    "llmPlatform": "OPEN_AI",
    "llmVersion": "gpt-4.1"
  },
  "enrollmentId": "enr_8f3a9c2d7b6e4a1f",
  "expirationTs": "2026-03-22T18:30:00Z",
  "maxAllowedTransactions": "1",
  "orderContext": {
    "allowPartialOrder": "NO",
    "currency": "USD",
    "items": [
      {
        "brand": "Example Brand",
        "category": "Smartphones",
        "condition": "new",
        "currency": "USD",
        "imageLink": "https://example.com/images/product-image",
        "isGiftCard": "NO",
        "isRecurBill": "NO",
        "isRefundable": "YES",
        "itemId": "item_001",
        "merchantId": 987654,
        "metadata": {
          "additionalProperty": "string",
          "color": "Black Titanium",
          "modelNumber": "A3101",
          "releaseYear": "2025"
        },
        "name": "Premium Smartphone 256GB",
        "purchaseCriteria": {
          "0": {
            "currency": "USD",
            "fromDate": "2026-03-20T18:30:00Z",
            "isShippingIncluded": "YES",
            "maxAmount": "1100",
            "pricePreference": "MAXIMUM_PRICE",
            "toDate": "2026-03-22T18:30:00Z",
            "type": "PRICE"
          }
        },
        "quantity": 1,
        "unitAmount": "1099"
      }
    ],
    "merchants": [
      {
        "appName": "Example Merchant App",
        "categoryName": "Electronics",
        "merchantId": 987654,
        "metadata": {
          "additionalProperty": "string",
          "storeType": "official"
        },
        "name": "Example Store",
        "seNumber": "123456789012",
        "url": "https://www.example.com"
      }
    ],
    "orderId": "order_789456123",
    "totalAmount": "1099",
    "type": "INTENT"
  },
  "prompt": {
    "nlpConfidence": 0.94,
    "promptSummary": "Buy a new premium smartphone under $1100 with fast delivery"
  },
  "purchaseDecision": "NON-DELEGATED",
  "risk": {
    "account": {
      "accountRiskScore": "2",
      "agentAccountLocale": "en-US",
      "mostRecentAccountPaymentMethodChangeActivity": 30,
      "panTenureOnFile": 24,
      "partnerStepUp": "NO",
      "recentSecurityActivity": "10"
    },
    "device": {
      "deviceId": "device_abc123",
      "deviceName": "John's Phone",
      "deviceRiskScore": "3",
      "deviceTenure": 12,
      "deviceType": "Phone",
      "ipAddress": "192.0.2.1",
      "location": {
        "latitude": "40.7128",
        "longitude": "-74.0060"
      },
      "tlsFingerprint": "771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0"
    },
    "metadata": {
      "additionalProperty": "string",
      "ipReputation": "low_risk"
    },
    "order": {
      "includesGiftCard": "YES"
    }
  },
  "shipment": {
    "shippingAddress": {
      "addressLine1": "300 Juniper Lane",
      "addressLine2": "Apt 4B",
      "city": "New York",
      "country": "US",
      "postalCode": "12345",
      "state": "NY"
    },
    "shippingEmail": "someone@example.com",
    "shippingMethod": "EXPEDITED",
    "shippingPhoneNumber": "+14155552671"
  },
  "spendControl": {
    "currency": "USD",
    "expirationTs": "2026-03-22T18:30:00Z",
    "maxAmount": "1100"
  },
  "user": {
    "billingAddress": {
      "addressLine1": "300 Juniper Lane",
      "addressLine2": "Apt 4B",
      "city": "New York",
      "country": "US",
      "postalCode": "12345",
      "state": "NY"
    },
    "email": "someone@example.com",
    "firstName": "Jane",
    "lastName": "Jones",
    "userEmailHash": "b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5",
    "userPhoneNumberHash": "a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877"
  }
}
```

**Response**

```json
{
  "availableChallenges": {
    "0": {
      "issuerSurface": {
        "authenticationToken": "string",
        "url": "string"
      },
      "type": "ISSUER_SURFACE"
    }
  },
  "enrollmentId": "string",
  "intentId": "string",
  "intentStatus": "PENDING_STEP_UP",
  "stepUpAuthenticationRequired": "YES",
  "stepUpSessionId": "string"
}
```

**SDK Code**

```python Submit updated intent for validation and risk assessment.
import requests

url = "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

payload = {
    "agent": {
        "agentName": "NexusAI",
        "llmPlatform": "OPEN_AI",
        "llmVersion": "gpt-4.1"
    },
    "enrollmentId": "enr_8f3a9c2d7b6e4a1f",
    "expirationTs": "2026-03-22T18:30:00Z",
    "maxAllowedTransactions": "1",
    "orderContext": {
        "allowPartialOrder": "NO",
        "currency": "USD",
        "items": [
            {
                "brand": "Example Brand",
                "category": "Smartphones",
                "condition": "new",
                "currency": "USD",
                "imageLink": "https://example.com/images/product-image",
                "isGiftCard": "NO",
                "isRecurBill": "NO",
                "isRefundable": "YES",
                "itemId": "item_001",
                "merchantId": 987654,
                "metadata": {
                    "additionalProperty": "string",
                    "color": "Black Titanium",
                    "modelNumber": "A3101",
                    "releaseYear": "2025"
                },
                "name": "Premium Smartphone 256GB",
                "purchaseCriteria": { "0": {
                        "currency": "USD",
                        "fromDate": "2026-03-20T18:30:00Z",
                        "isShippingIncluded": "YES",
                        "maxAmount": "1100",
                        "pricePreference": "MAXIMUM_PRICE",
                        "toDate": "2026-03-22T18:30:00Z",
                        "type": "PRICE"
                    } },
                "quantity": 1,
                "unitAmount": "1099"
            }
        ],
        "merchants": [
            {
                "appName": "Example Merchant App",
                "categoryName": "Electronics",
                "merchantId": 987654,
                "metadata": {
                    "additionalProperty": "string",
                    "storeType": "official"
                },
                "name": "Example Store",
                "seNumber": "123456789012",
                "url": "https://www.example.com"
            }
        ],
        "orderId": "order_789456123",
        "totalAmount": "1099",
        "type": "INTENT"
    },
    "prompt": {
        "nlpConfidence": 0.94,
        "promptSummary": "Buy a new premium smartphone under $1100 with fast delivery"
    },
    "purchaseDecision": "NON-DELEGATED",
    "risk": {
        "account": {
            "accountRiskScore": "2",
            "agentAccountLocale": "en-US",
            "mostRecentAccountPaymentMethodChangeActivity": 30,
            "panTenureOnFile": 24,
            "partnerStepUp": "NO",
            "recentSecurityActivity": "10"
        },
        "device": {
            "deviceId": "device_abc123",
            "deviceName": "John's Phone",
            "deviceRiskScore": "3",
            "deviceTenure": 12,
            "deviceType": "Phone",
            "ipAddress": "192.0.2.1",
            "location": {
                "latitude": "40.7128",
                "longitude": "-74.0060"
            },
            "tlsFingerprint": "771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0"
        },
        "metadata": {
            "additionalProperty": "string",
            "ipReputation": "low_risk"
        },
        "order": { "includesGiftCard": "YES" }
    },
    "shipment": {
        "shippingAddress": {
            "addressLine1": "300 Juniper Lane",
            "addressLine2": "Apt 4B",
            "city": "New York",
            "country": "US",
            "postalCode": "12345",
            "state": "NY"
        },
        "shippingEmail": "someone@example.com",
        "shippingMethod": "EXPEDITED",
        "shippingPhoneNumber": "+14155552671"
    },
    "spendControl": {
        "currency": "USD",
        "expirationTs": "2026-03-22T18:30:00Z",
        "maxAmount": "1100"
    },
    "user": {
        "billingAddress": {
            "addressLine1": "300 Juniper Lane",
            "addressLine2": "Apt 4B",
            "city": "New York",
            "country": "US",
            "postalCode": "12345",
            "state": "NY"
        },
        "email": "someone@example.com",
        "firstName": "Jane",
        "lastName": "Jones",
        "userEmailHash": "b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5",
        "userPhoneNumberHash": "a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "agentId": "agentId",
    "trackingId": "trackingId",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Submit updated intent for validation and risk assessment.
const url = 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId';
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <token>',
    agentId: 'agentId',
    trackingId: 'trackingId',
    'Content-Type': 'application/json'
  },
  body: '{"agent":{"agentName":"NexusAI","llmPlatform":"OPEN_AI","llmVersion":"gpt-4.1"},"enrollmentId":"enr_8f3a9c2d7b6e4a1f","expirationTs":"2026-03-22T18:30:00Z","maxAllowedTransactions":"1","orderContext":{"allowPartialOrder":"NO","currency":"USD","items":[{"brand":"Example Brand","category":"Smartphones","condition":"new","currency":"USD","imageLink":"https://example.com/images/product-image","isGiftCard":"NO","isRecurBill":"NO","isRefundable":"YES","itemId":"item_001","merchantId":987654,"metadata":{"additionalProperty":"string","color":"Black Titanium","modelNumber":"A3101","releaseYear":"2025"},"name":"Premium Smartphone 256GB","purchaseCriteria":{"0":{"currency":"USD","fromDate":"2026-03-20T18:30:00Z","isShippingIncluded":"YES","maxAmount":"1100","pricePreference":"MAXIMUM_PRICE","toDate":"2026-03-22T18:30:00Z","type":"PRICE"}},"quantity":1,"unitAmount":"1099"}],"merchants":[{"appName":"Example Merchant App","categoryName":"Electronics","merchantId":987654,"metadata":{"additionalProperty":"string","storeType":"official"},"name":"Example Store","seNumber":"123456789012","url":"https://www.example.com"}],"orderId":"order_789456123","totalAmount":"1099","type":"INTENT"},"prompt":{"nlpConfidence":0.94,"promptSummary":"Buy a new premium smartphone under $1100 with fast delivery"},"purchaseDecision":"NON-DELEGATED","risk":{"account":{"accountRiskScore":"2","agentAccountLocale":"en-US","mostRecentAccountPaymentMethodChangeActivity":30,"panTenureOnFile":24,"partnerStepUp":"NO","recentSecurityActivity":"10"},"device":{"deviceId":"device_abc123","deviceName":"John\'s Phone","deviceRiskScore":"3","deviceTenure":12,"deviceType":"Phone","ipAddress":"192.0.2.1","location":{"latitude":"40.7128","longitude":"-74.0060"},"tlsFingerprint":"771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0"},"metadata":{"additionalProperty":"string","ipReputation":"low_risk"},"order":{"includesGiftCard":"YES"}},"shipment":{"shippingAddress":{"addressLine1":"300 Juniper Lane","addressLine2":"Apt 4B","city":"New York","country":"US","postalCode":"12345","state":"NY"},"shippingEmail":"someone@example.com","shippingMethod":"EXPEDITED","shippingPhoneNumber":"+14155552671"},"spendControl":{"currency":"USD","expirationTs":"2026-03-22T18:30:00Z","maxAmount":"1100"},"user":{"billingAddress":{"addressLine1":"300 Juniper Lane","addressLine2":"Apt 4B","city":"New York","country":"US","postalCode":"12345","state":"NY"},"email":"someone@example.com","firstName":"Jane","lastName":"Jones","userEmailHash":"b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5","userPhoneNumberHash":"a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Submit updated intent for validation and risk assessment.
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

	payload := strings.NewReader("{\n  \"agent\": {\n    \"agentName\": \"NexusAI\",\n    \"llmPlatform\": \"OPEN_AI\",\n    \"llmVersion\": \"gpt-4.1\"\n  },\n  \"enrollmentId\": \"enr_8f3a9c2d7b6e4a1f\",\n  \"expirationTs\": \"2026-03-22T18:30:00Z\",\n  \"maxAllowedTransactions\": \"1\",\n  \"orderContext\": {\n    \"allowPartialOrder\": \"NO\",\n    \"currency\": \"USD\",\n    \"items\": [\n      {\n        \"brand\": \"Example Brand\",\n        \"category\": \"Smartphones\",\n        \"condition\": \"new\",\n        \"currency\": \"USD\",\n        \"imageLink\": \"https://example.com/images/product-image\",\n        \"isGiftCard\": \"NO\",\n        \"isRecurBill\": \"NO\",\n        \"isRefundable\": \"YES\",\n        \"itemId\": \"item_001\",\n        \"merchantId\": 987654,\n        \"metadata\": {\n          \"additionalProperty\": \"string\",\n          \"color\": \"Black Titanium\",\n          \"modelNumber\": \"A3101\",\n          \"releaseYear\": \"2025\"\n        },\n        \"name\": \"Premium Smartphone 256GB\",\n        \"purchaseCriteria\": {\n          \"0\": {\n            \"currency\": \"USD\",\n            \"fromDate\": \"2026-03-20T18:30:00Z\",\n            \"isShippingIncluded\": \"YES\",\n            \"maxAmount\": \"1100\",\n            \"pricePreference\": \"MAXIMUM_PRICE\",\n            \"toDate\": \"2026-03-22T18:30:00Z\",\n            \"type\": \"PRICE\"\n          }\n        },\n        \"quantity\": 1,\n        \"unitAmount\": \"1099\"\n      }\n    ],\n    \"merchants\": [\n      {\n        \"appName\": \"Example Merchant App\",\n        \"categoryName\": \"Electronics\",\n        \"merchantId\": 987654,\n        \"metadata\": {\n          \"additionalProperty\": \"string\",\n          \"storeType\": \"official\"\n        },\n        \"name\": \"Example Store\",\n        \"seNumber\": \"123456789012\",\n        \"url\": \"https://www.example.com\"\n      }\n    ],\n    \"orderId\": \"order_789456123\",\n    \"totalAmount\": \"1099\",\n    \"type\": \"INTENT\"\n  },\n  \"prompt\": {\n    \"nlpConfidence\": 0.94,\n    \"promptSummary\": \"Buy a new premium smartphone under $1100 with fast delivery\"\n  },\n  \"purchaseDecision\": \"NON-DELEGATED\",\n  \"risk\": {\n    \"account\": {\n      \"accountRiskScore\": \"2\",\n      \"agentAccountLocale\": \"en-US\",\n      \"mostRecentAccountPaymentMethodChangeActivity\": 30,\n      \"panTenureOnFile\": 24,\n      \"partnerStepUp\": \"NO\",\n      \"recentSecurityActivity\": \"10\"\n    },\n    \"device\": {\n      \"deviceId\": \"device_abc123\",\n      \"deviceName\": \"John's Phone\",\n      \"deviceRiskScore\": \"3\",\n      \"deviceTenure\": 12,\n      \"deviceType\": \"Phone\",\n      \"ipAddress\": \"192.0.2.1\",\n      \"location\": {\n        \"latitude\": \"40.7128\",\n        \"longitude\": \"-74.0060\"\n      },\n      \"tlsFingerprint\": \"771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0\"\n    },\n    \"metadata\": {\n      \"additionalProperty\": \"string\",\n      \"ipReputation\": \"low_risk\"\n    },\n    \"order\": {\n      \"includesGiftCard\": \"YES\"\n    }\n  },\n  \"shipment\": {\n    \"shippingAddress\": {\n      \"addressLine1\": \"300 Juniper Lane\",\n      \"addressLine2\": \"Apt 4B\",\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"postalCode\": \"12345\",\n      \"state\": \"NY\"\n    },\n    \"shippingEmail\": \"someone@example.com\",\n    \"shippingMethod\": \"EXPEDITED\",\n    \"shippingPhoneNumber\": \"+14155552671\"\n  },\n  \"spendControl\": {\n    \"currency\": \"USD\",\n    \"expirationTs\": \"2026-03-22T18:30:00Z\",\n    \"maxAmount\": \"1100\"\n  },\n  \"user\": {\n    \"billingAddress\": {\n      \"addressLine1\": \"300 Juniper Lane\",\n      \"addressLine2\": \"Apt 4B\",\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"postalCode\": \"12345\",\n      \"state\": \"NY\"\n    },\n    \"email\": \"someone@example.com\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Jones\",\n    \"userEmailHash\": \"b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5\",\n    \"userPhoneNumberHash\": \"a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("agentId", "agentId")
	req.Header.Add("trackingId", "trackingId")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Submit updated intent for validation and risk assessment.
require 'uri'
require 'net/http'

url = URI("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["agentId"] = 'agentId'
request["trackingId"] = 'trackingId'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"agent\": {\n    \"agentName\": \"NexusAI\",\n    \"llmPlatform\": \"OPEN_AI\",\n    \"llmVersion\": \"gpt-4.1\"\n  },\n  \"enrollmentId\": \"enr_8f3a9c2d7b6e4a1f\",\n  \"expirationTs\": \"2026-03-22T18:30:00Z\",\n  \"maxAllowedTransactions\": \"1\",\n  \"orderContext\": {\n    \"allowPartialOrder\": \"NO\",\n    \"currency\": \"USD\",\n    \"items\": [\n      {\n        \"brand\": \"Example Brand\",\n        \"category\": \"Smartphones\",\n        \"condition\": \"new\",\n        \"currency\": \"USD\",\n        \"imageLink\": \"https://example.com/images/product-image\",\n        \"isGiftCard\": \"NO\",\n        \"isRecurBill\": \"NO\",\n        \"isRefundable\": \"YES\",\n        \"itemId\": \"item_001\",\n        \"merchantId\": 987654,\n        \"metadata\": {\n          \"additionalProperty\": \"string\",\n          \"color\": \"Black Titanium\",\n          \"modelNumber\": \"A3101\",\n          \"releaseYear\": \"2025\"\n        },\n        \"name\": \"Premium Smartphone 256GB\",\n        \"purchaseCriteria\": {\n          \"0\": {\n            \"currency\": \"USD\",\n            \"fromDate\": \"2026-03-20T18:30:00Z\",\n            \"isShippingIncluded\": \"YES\",\n            \"maxAmount\": \"1100\",\n            \"pricePreference\": \"MAXIMUM_PRICE\",\n            \"toDate\": \"2026-03-22T18:30:00Z\",\n            \"type\": \"PRICE\"\n          }\n        },\n        \"quantity\": 1,\n        \"unitAmount\": \"1099\"\n      }\n    ],\n    \"merchants\": [\n      {\n        \"appName\": \"Example Merchant App\",\n        \"categoryName\": \"Electronics\",\n        \"merchantId\": 987654,\n        \"metadata\": {\n          \"additionalProperty\": \"string\",\n          \"storeType\": \"official\"\n        },\n        \"name\": \"Example Store\",\n        \"seNumber\": \"123456789012\",\n        \"url\": \"https://www.example.com\"\n      }\n    ],\n    \"orderId\": \"order_789456123\",\n    \"totalAmount\": \"1099\",\n    \"type\": \"INTENT\"\n  },\n  \"prompt\": {\n    \"nlpConfidence\": 0.94,\n    \"promptSummary\": \"Buy a new premium smartphone under $1100 with fast delivery\"\n  },\n  \"purchaseDecision\": \"NON-DELEGATED\",\n  \"risk\": {\n    \"account\": {\n      \"accountRiskScore\": \"2\",\n      \"agentAccountLocale\": \"en-US\",\n      \"mostRecentAccountPaymentMethodChangeActivity\": 30,\n      \"panTenureOnFile\": 24,\n      \"partnerStepUp\": \"NO\",\n      \"recentSecurityActivity\": \"10\"\n    },\n    \"device\": {\n      \"deviceId\": \"device_abc123\",\n      \"deviceName\": \"John's Phone\",\n      \"deviceRiskScore\": \"3\",\n      \"deviceTenure\": 12,\n      \"deviceType\": \"Phone\",\n      \"ipAddress\": \"192.0.2.1\",\n      \"location\": {\n        \"latitude\": \"40.7128\",\n        \"longitude\": \"-74.0060\"\n      },\n      \"tlsFingerprint\": \"771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0\"\n    },\n    \"metadata\": {\n      \"additionalProperty\": \"string\",\n      \"ipReputation\": \"low_risk\"\n    },\n    \"order\": {\n      \"includesGiftCard\": \"YES\"\n    }\n  },\n  \"shipment\": {\n    \"shippingAddress\": {\n      \"addressLine1\": \"300 Juniper Lane\",\n      \"addressLine2\": \"Apt 4B\",\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"postalCode\": \"12345\",\n      \"state\": \"NY\"\n    },\n    \"shippingEmail\": \"someone@example.com\",\n    \"shippingMethod\": \"EXPEDITED\",\n    \"shippingPhoneNumber\": \"+14155552671\"\n  },\n  \"spendControl\": {\n    \"currency\": \"USD\",\n    \"expirationTs\": \"2026-03-22T18:30:00Z\",\n    \"maxAmount\": \"1100\"\n  },\n  \"user\": {\n    \"billingAddress\": {\n      \"addressLine1\": \"300 Juniper Lane\",\n      \"addressLine2\": \"Apt 4B\",\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"postalCode\": \"12345\",\n      \"state\": \"NY\"\n    },\n    \"email\": \"someone@example.com\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Jones\",\n    \"userEmailHash\": \"b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5\",\n    \"userPhoneNumberHash\": \"a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Submit updated intent for validation and risk assessment.
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")
  .header("Authorization", "Bearer <token>")
  .header("agentId", "agentId")
  .header("trackingId", "trackingId")
  .header("Content-Type", "application/json")
  .body("{\n  \"agent\": {\n    \"agentName\": \"NexusAI\",\n    \"llmPlatform\": \"OPEN_AI\",\n    \"llmVersion\": \"gpt-4.1\"\n  },\n  \"enrollmentId\": \"enr_8f3a9c2d7b6e4a1f\",\n  \"expirationTs\": \"2026-03-22T18:30:00Z\",\n  \"maxAllowedTransactions\": \"1\",\n  \"orderContext\": {\n    \"allowPartialOrder\": \"NO\",\n    \"currency\": \"USD\",\n    \"items\": [\n      {\n        \"brand\": \"Example Brand\",\n        \"category\": \"Smartphones\",\n        \"condition\": \"new\",\n        \"currency\": \"USD\",\n        \"imageLink\": \"https://example.com/images/product-image\",\n        \"isGiftCard\": \"NO\",\n        \"isRecurBill\": \"NO\",\n        \"isRefundable\": \"YES\",\n        \"itemId\": \"item_001\",\n        \"merchantId\": 987654,\n        \"metadata\": {\n          \"additionalProperty\": \"string\",\n          \"color\": \"Black Titanium\",\n          \"modelNumber\": \"A3101\",\n          \"releaseYear\": \"2025\"\n        },\n        \"name\": \"Premium Smartphone 256GB\",\n        \"purchaseCriteria\": {\n          \"0\": {\n            \"currency\": \"USD\",\n            \"fromDate\": \"2026-03-20T18:30:00Z\",\n            \"isShippingIncluded\": \"YES\",\n            \"maxAmount\": \"1100\",\n            \"pricePreference\": \"MAXIMUM_PRICE\",\n            \"toDate\": \"2026-03-22T18:30:00Z\",\n            \"type\": \"PRICE\"\n          }\n        },\n        \"quantity\": 1,\n        \"unitAmount\": \"1099\"\n      }\n    ],\n    \"merchants\": [\n      {\n        \"appName\": \"Example Merchant App\",\n        \"categoryName\": \"Electronics\",\n        \"merchantId\": 987654,\n        \"metadata\": {\n          \"additionalProperty\": \"string\",\n          \"storeType\": \"official\"\n        },\n        \"name\": \"Example Store\",\n        \"seNumber\": \"123456789012\",\n        \"url\": \"https://www.example.com\"\n      }\n    ],\n    \"orderId\": \"order_789456123\",\n    \"totalAmount\": \"1099\",\n    \"type\": \"INTENT\"\n  },\n  \"prompt\": {\n    \"nlpConfidence\": 0.94,\n    \"promptSummary\": \"Buy a new premium smartphone under $1100 with fast delivery\"\n  },\n  \"purchaseDecision\": \"NON-DELEGATED\",\n  \"risk\": {\n    \"account\": {\n      \"accountRiskScore\": \"2\",\n      \"agentAccountLocale\": \"en-US\",\n      \"mostRecentAccountPaymentMethodChangeActivity\": 30,\n      \"panTenureOnFile\": 24,\n      \"partnerStepUp\": \"NO\",\n      \"recentSecurityActivity\": \"10\"\n    },\n    \"device\": {\n      \"deviceId\": \"device_abc123\",\n      \"deviceName\": \"John's Phone\",\n      \"deviceRiskScore\": \"3\",\n      \"deviceTenure\": 12,\n      \"deviceType\": \"Phone\",\n      \"ipAddress\": \"192.0.2.1\",\n      \"location\": {\n        \"latitude\": \"40.7128\",\n        \"longitude\": \"-74.0060\"\n      },\n      \"tlsFingerprint\": \"771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0\"\n    },\n    \"metadata\": {\n      \"additionalProperty\": \"string\",\n      \"ipReputation\": \"low_risk\"\n    },\n    \"order\": {\n      \"includesGiftCard\": \"YES\"\n    }\n  },\n  \"shipment\": {\n    \"shippingAddress\": {\n      \"addressLine1\": \"300 Juniper Lane\",\n      \"addressLine2\": \"Apt 4B\",\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"postalCode\": \"12345\",\n      \"state\": \"NY\"\n    },\n    \"shippingEmail\": \"someone@example.com\",\n    \"shippingMethod\": \"EXPEDITED\",\n    \"shippingPhoneNumber\": \"+14155552671\"\n  },\n  \"spendControl\": {\n    \"currency\": \"USD\",\n    \"expirationTs\": \"2026-03-22T18:30:00Z\",\n    \"maxAmount\": \"1100\"\n  },\n  \"user\": {\n    \"billingAddress\": {\n      \"addressLine1\": \"300 Juniper Lane\",\n      \"addressLine2\": \"Apt 4B\",\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"postalCode\": \"12345\",\n      \"state\": \"NY\"\n    },\n    \"email\": \"someone@example.com\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Jones\",\n    \"userEmailHash\": \"b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5\",\n    \"userPhoneNumberHash\": \"a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877\"\n  }\n}")
  .asString();
```

```php Submit updated intent for validation and risk assessment.
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId', [
  'body' => '{
  "agent": {
    "agentName": "NexusAI",
    "llmPlatform": "OPEN_AI",
    "llmVersion": "gpt-4.1"
  },
  "enrollmentId": "enr_8f3a9c2d7b6e4a1f",
  "expirationTs": "2026-03-22T18:30:00Z",
  "maxAllowedTransactions": "1",
  "orderContext": {
    "allowPartialOrder": "NO",
    "currency": "USD",
    "items": [
      {
        "brand": "Example Brand",
        "category": "Smartphones",
        "condition": "new",
        "currency": "USD",
        "imageLink": "https://example.com/images/product-image",
        "isGiftCard": "NO",
        "isRecurBill": "NO",
        "isRefundable": "YES",
        "itemId": "item_001",
        "merchantId": 987654,
        "metadata": {
          "additionalProperty": "string",
          "color": "Black Titanium",
          "modelNumber": "A3101",
          "releaseYear": "2025"
        },
        "name": "Premium Smartphone 256GB",
        "purchaseCriteria": {
          "0": {
            "currency": "USD",
            "fromDate": "2026-03-20T18:30:00Z",
            "isShippingIncluded": "YES",
            "maxAmount": "1100",
            "pricePreference": "MAXIMUM_PRICE",
            "toDate": "2026-03-22T18:30:00Z",
            "type": "PRICE"
          }
        },
        "quantity": 1,
        "unitAmount": "1099"
      }
    ],
    "merchants": [
      {
        "appName": "Example Merchant App",
        "categoryName": "Electronics",
        "merchantId": 987654,
        "metadata": {
          "additionalProperty": "string",
          "storeType": "official"
        },
        "name": "Example Store",
        "seNumber": "123456789012",
        "url": "https://www.example.com"
      }
    ],
    "orderId": "order_789456123",
    "totalAmount": "1099",
    "type": "INTENT"
  },
  "prompt": {
    "nlpConfidence": 0.94,
    "promptSummary": "Buy a new premium smartphone under $1100 with fast delivery"
  },
  "purchaseDecision": "NON-DELEGATED",
  "risk": {
    "account": {
      "accountRiskScore": "2",
      "agentAccountLocale": "en-US",
      "mostRecentAccountPaymentMethodChangeActivity": 30,
      "panTenureOnFile": 24,
      "partnerStepUp": "NO",
      "recentSecurityActivity": "10"
    },
    "device": {
      "deviceId": "device_abc123",
      "deviceName": "John\'s Phone",
      "deviceRiskScore": "3",
      "deviceTenure": 12,
      "deviceType": "Phone",
      "ipAddress": "192.0.2.1",
      "location": {
        "latitude": "40.7128",
        "longitude": "-74.0060"
      },
      "tlsFingerprint": "771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0"
    },
    "metadata": {
      "additionalProperty": "string",
      "ipReputation": "low_risk"
    },
    "order": {
      "includesGiftCard": "YES"
    }
  },
  "shipment": {
    "shippingAddress": {
      "addressLine1": "300 Juniper Lane",
      "addressLine2": "Apt 4B",
      "city": "New York",
      "country": "US",
      "postalCode": "12345",
      "state": "NY"
    },
    "shippingEmail": "someone@example.com",
    "shippingMethod": "EXPEDITED",
    "shippingPhoneNumber": "+14155552671"
  },
  "spendControl": {
    "currency": "USD",
    "expirationTs": "2026-03-22T18:30:00Z",
    "maxAmount": "1100"
  },
  "user": {
    "billingAddress": {
      "addressLine1": "300 Juniper Lane",
      "addressLine2": "Apt 4B",
      "city": "New York",
      "country": "US",
      "postalCode": "12345",
      "state": "NY"
    },
    "email": "someone@example.com",
    "firstName": "Jane",
    "lastName": "Jones",
    "userEmailHash": "b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5",
    "userPhoneNumberHash": "a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'agentId' => 'agentId',
    'trackingId' => 'trackingId',
  ],
]);

echo $response->getBody();
```

```csharp Submit updated intent for validation and risk assessment.
using RestSharp;

var client = new RestClient("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("agentId", "agentId");
request.AddHeader("trackingId", "trackingId");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"agent\": {\n    \"agentName\": \"NexusAI\",\n    \"llmPlatform\": \"OPEN_AI\",\n    \"llmVersion\": \"gpt-4.1\"\n  },\n  \"enrollmentId\": \"enr_8f3a9c2d7b6e4a1f\",\n  \"expirationTs\": \"2026-03-22T18:30:00Z\",\n  \"maxAllowedTransactions\": \"1\",\n  \"orderContext\": {\n    \"allowPartialOrder\": \"NO\",\n    \"currency\": \"USD\",\n    \"items\": [\n      {\n        \"brand\": \"Example Brand\",\n        \"category\": \"Smartphones\",\n        \"condition\": \"new\",\n        \"currency\": \"USD\",\n        \"imageLink\": \"https://example.com/images/product-image\",\n        \"isGiftCard\": \"NO\",\n        \"isRecurBill\": \"NO\",\n        \"isRefundable\": \"YES\",\n        \"itemId\": \"item_001\",\n        \"merchantId\": 987654,\n        \"metadata\": {\n          \"additionalProperty\": \"string\",\n          \"color\": \"Black Titanium\",\n          \"modelNumber\": \"A3101\",\n          \"releaseYear\": \"2025\"\n        },\n        \"name\": \"Premium Smartphone 256GB\",\n        \"purchaseCriteria\": {\n          \"0\": {\n            \"currency\": \"USD\",\n            \"fromDate\": \"2026-03-20T18:30:00Z\",\n            \"isShippingIncluded\": \"YES\",\n            \"maxAmount\": \"1100\",\n            \"pricePreference\": \"MAXIMUM_PRICE\",\n            \"toDate\": \"2026-03-22T18:30:00Z\",\n            \"type\": \"PRICE\"\n          }\n        },\n        \"quantity\": 1,\n        \"unitAmount\": \"1099\"\n      }\n    ],\n    \"merchants\": [\n      {\n        \"appName\": \"Example Merchant App\",\n        \"categoryName\": \"Electronics\",\n        \"merchantId\": 987654,\n        \"metadata\": {\n          \"additionalProperty\": \"string\",\n          \"storeType\": \"official\"\n        },\n        \"name\": \"Example Store\",\n        \"seNumber\": \"123456789012\",\n        \"url\": \"https://www.example.com\"\n      }\n    ],\n    \"orderId\": \"order_789456123\",\n    \"totalAmount\": \"1099\",\n    \"type\": \"INTENT\"\n  },\n  \"prompt\": {\n    \"nlpConfidence\": 0.94,\n    \"promptSummary\": \"Buy a new premium smartphone under $1100 with fast delivery\"\n  },\n  \"purchaseDecision\": \"NON-DELEGATED\",\n  \"risk\": {\n    \"account\": {\n      \"accountRiskScore\": \"2\",\n      \"agentAccountLocale\": \"en-US\",\n      \"mostRecentAccountPaymentMethodChangeActivity\": 30,\n      \"panTenureOnFile\": 24,\n      \"partnerStepUp\": \"NO\",\n      \"recentSecurityActivity\": \"10\"\n    },\n    \"device\": {\n      \"deviceId\": \"device_abc123\",\n      \"deviceName\": \"John's Phone\",\n      \"deviceRiskScore\": \"3\",\n      \"deviceTenure\": 12,\n      \"deviceType\": \"Phone\",\n      \"ipAddress\": \"192.0.2.1\",\n      \"location\": {\n        \"latitude\": \"40.7128\",\n        \"longitude\": \"-74.0060\"\n      },\n      \"tlsFingerprint\": \"771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0\"\n    },\n    \"metadata\": {\n      \"additionalProperty\": \"string\",\n      \"ipReputation\": \"low_risk\"\n    },\n    \"order\": {\n      \"includesGiftCard\": \"YES\"\n    }\n  },\n  \"shipment\": {\n    \"shippingAddress\": {\n      \"addressLine1\": \"300 Juniper Lane\",\n      \"addressLine2\": \"Apt 4B\",\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"postalCode\": \"12345\",\n      \"state\": \"NY\"\n    },\n    \"shippingEmail\": \"someone@example.com\",\n    \"shippingMethod\": \"EXPEDITED\",\n    \"shippingPhoneNumber\": \"+14155552671\"\n  },\n  \"spendControl\": {\n    \"currency\": \"USD\",\n    \"expirationTs\": \"2026-03-22T18:30:00Z\",\n    \"maxAmount\": \"1100\"\n  },\n  \"user\": {\n    \"billingAddress\": {\n      \"addressLine1\": \"300 Juniper Lane\",\n      \"addressLine2\": \"Apt 4B\",\n      \"city\": \"New York\",\n      \"country\": \"US\",\n      \"postalCode\": \"12345\",\n      \"state\": \"NY\"\n    },\n    \"email\": \"someone@example.com\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Jones\",\n    \"userEmailHash\": \"b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5\",\n    \"userPhoneNumberHash\": \"a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Submit updated intent for validation and risk assessment.
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "agentId": "agentId",
  "trackingId": "trackingId",
  "Content-Type": "application/json"
]
let parameters = [
  "agent": [
    "agentName": "NexusAI",
    "llmPlatform": "OPEN_AI",
    "llmVersion": "gpt-4.1"
  ],
  "enrollmentId": "enr_8f3a9c2d7b6e4a1f",
  "expirationTs": "2026-03-22T18:30:00Z",
  "maxAllowedTransactions": "1",
  "orderContext": [
    "allowPartialOrder": "NO",
    "currency": "USD",
    "items": [
      [
        "brand": "Example Brand",
        "category": "Smartphones",
        "condition": "new",
        "currency": "USD",
        "imageLink": "https://example.com/images/product-image",
        "isGiftCard": "NO",
        "isRecurBill": "NO",
        "isRefundable": "YES",
        "itemId": "item_001",
        "merchantId": 987654,
        "metadata": [
          "additionalProperty": "string",
          "color": "Black Titanium",
          "modelNumber": "A3101",
          "releaseYear": "2025"
        ],
        "name": "Premium Smartphone 256GB",
        "purchaseCriteria": ["0": [
            "currency": "USD",
            "fromDate": "2026-03-20T18:30:00Z",
            "isShippingIncluded": "YES",
            "maxAmount": "1100",
            "pricePreference": "MAXIMUM_PRICE",
            "toDate": "2026-03-22T18:30:00Z",
            "type": "PRICE"
          ]],
        "quantity": 1,
        "unitAmount": "1099"
      ]
    ],
    "merchants": [
      [
        "appName": "Example Merchant App",
        "categoryName": "Electronics",
        "merchantId": 987654,
        "metadata": [
          "additionalProperty": "string",
          "storeType": "official"
        ],
        "name": "Example Store",
        "seNumber": "123456789012",
        "url": "https://www.example.com"
      ]
    ],
    "orderId": "order_789456123",
    "totalAmount": "1099",
    "type": "INTENT"
  ],
  "prompt": [
    "nlpConfidence": 0.94,
    "promptSummary": "Buy a new premium smartphone under $1100 with fast delivery"
  ],
  "purchaseDecision": "NON-DELEGATED",
  "risk": [
    "account": [
      "accountRiskScore": "2",
      "agentAccountLocale": "en-US",
      "mostRecentAccountPaymentMethodChangeActivity": 30,
      "panTenureOnFile": 24,
      "partnerStepUp": "NO",
      "recentSecurityActivity": "10"
    ],
    "device": [
      "deviceId": "device_abc123",
      "deviceName": "John's Phone",
      "deviceRiskScore": "3",
      "deviceTenure": 12,
      "deviceType": "Phone",
      "ipAddress": "192.0.2.1",
      "location": [
        "latitude": "40.7128",
        "longitude": "-74.0060"
      ],
      "tlsFingerprint": "771,4865-4866-4867-49195-49196,0-11-10-35,29-23-24,0"
    ],
    "metadata": [
      "additionalProperty": "string",
      "ipReputation": "low_risk"
    ],
    "order": ["includesGiftCard": "YES"]
  ],
  "shipment": [
    "shippingAddress": [
      "addressLine1": "300 Juniper Lane",
      "addressLine2": "Apt 4B",
      "city": "New York",
      "country": "US",
      "postalCode": "12345",
      "state": "NY"
    ],
    "shippingEmail": "someone@example.com",
    "shippingMethod": "EXPEDITED",
    "shippingPhoneNumber": "+14155552671"
  ],
  "spendControl": [
    "currency": "USD",
    "expirationTs": "2026-03-22T18:30:00Z",
    "maxAmount": "1100"
  ],
  "user": [
    "billingAddress": [
      "addressLine1": "300 Juniper Lane",
      "addressLine2": "Apt 4B",
      "city": "New York",
      "country": "US",
      "postalCode": "12345",
      "state": "NY"
    ],
    "email": "someone@example.com",
    "firstName": "Jane",
    "lastName": "Jones",
    "userEmailHash": "b4c9a289323b21a01c3e940f150eb9b8b6c8f0d3a9a5f8c2e5d7f6a1b2c3d4e5",
    "userPhoneNumberHash": "a3f5c2e9d4b7c1a8f6e2d3c4b5a6978877665544332211ffeeddccbbaa998877"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### The follow-up request after completing step-up verification.

**Request**

```json
{
  "enrollmentId": "enr_8f3a9c2d7b6e4a1f",
  "stepUpVerification": {
    "issuerSurfaceAuthenticationResponse": {
      "authenticationToken": "rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e"
    },
    "stepUpSessionId": "sess_9f3a7c2d8b6e4a1f"
  }
}
```

**Response**

```json
{
  "availableChallenges": {
    "0": {
      "issuerSurface": {
        "authenticationToken": "string",
        "url": "string"
      },
      "type": "ISSUER_SURFACE"
    }
  },
  "enrollmentId": "string",
  "intentId": "string",
  "intentStatus": "PENDING_STEP_UP",
  "stepUpAuthenticationRequired": "YES",
  "stepUpSessionId": "string"
}
```

**SDK Code**

```python The follow-up request after completing step-up verification.
import requests

url = "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

payload = {
    "enrollmentId": "enr_8f3a9c2d7b6e4a1f",
    "stepUpVerification": {
        "issuerSurfaceAuthenticationResponse": { "authenticationToken": "rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e" },
        "stepUpSessionId": "sess_9f3a7c2d8b6e4a1f"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "agentId": "agentId",
    "trackingId": "trackingId",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript The follow-up request after completing step-up verification.
const url = 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId';
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <token>',
    agentId: 'agentId',
    trackingId: 'trackingId',
    'Content-Type': 'application/json'
  },
  body: '{"enrollmentId":"enr_8f3a9c2d7b6e4a1f","stepUpVerification":{"issuerSurfaceAuthenticationResponse":{"authenticationToken":"rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e"},"stepUpSessionId":"sess_9f3a7c2d8b6e4a1f"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go The follow-up request after completing step-up verification.
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

	payload := strings.NewReader("{\n  \"enrollmentId\": \"enr_8f3a9c2d7b6e4a1f\",\n  \"stepUpVerification\": {\n    \"issuerSurfaceAuthenticationResponse\": {\n      \"authenticationToken\": \"rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e\"\n    },\n    \"stepUpSessionId\": \"sess_9f3a7c2d8b6e4a1f\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("agentId", "agentId")
	req.Header.Add("trackingId", "trackingId")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby The follow-up request after completing step-up verification.
require 'uri'
require 'net/http'

url = URI("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["agentId"] = 'agentId'
request["trackingId"] = 'trackingId'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"enrollmentId\": \"enr_8f3a9c2d7b6e4a1f\",\n  \"stepUpVerification\": {\n    \"issuerSurfaceAuthenticationResponse\": {\n      \"authenticationToken\": \"rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e\"\n    },\n    \"stepUpSessionId\": \"sess_9f3a7c2d8b6e4a1f\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java The follow-up request after completing step-up verification.
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")
  .header("Authorization", "Bearer <token>")
  .header("agentId", "agentId")
  .header("trackingId", "trackingId")
  .header("Content-Type", "application/json")
  .body("{\n  \"enrollmentId\": \"enr_8f3a9c2d7b6e4a1f\",\n  \"stepUpVerification\": {\n    \"issuerSurfaceAuthenticationResponse\": {\n      \"authenticationToken\": \"rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e\"\n    },\n    \"stepUpSessionId\": \"sess_9f3a7c2d8b6e4a1f\"\n  }\n}")
  .asString();
```

```php The follow-up request after completing step-up verification.
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId', [
  'body' => '{
  "enrollmentId": "enr_8f3a9c2d7b6e4a1f",
  "stepUpVerification": {
    "issuerSurfaceAuthenticationResponse": {
      "authenticationToken": "rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e"
    },
    "stepUpSessionId": "sess_9f3a7c2d8b6e4a1f"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'agentId' => 'agentId',
    'trackingId' => 'trackingId',
  ],
]);

echo $response->getBody();
```

```csharp The follow-up request after completing step-up verification.
using RestSharp;

var client = new RestClient("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("agentId", "agentId");
request.AddHeader("trackingId", "trackingId");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"enrollmentId\": \"enr_8f3a9c2d7b6e4a1f\",\n  \"stepUpVerification\": {\n    \"issuerSurfaceAuthenticationResponse\": {\n      \"authenticationToken\": \"rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e\"\n    },\n    \"stepUpSessionId\": \"sess_9f3a7c2d8b6e4a1f\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift The follow-up request after completing step-up verification.
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "agentId": "agentId",
  "trackingId": "trackingId",
  "Content-Type": "application/json"
]
let parameters = [
  "enrollmentId": "enr_8f3a9c2d7b6e4a1f",
  "stepUpVerification": [
    "issuerSurfaceAuthenticationResponse": ["authenticationToken": "rt_7a9c3d5e8f1b4a2c9d0e6f3a1b2c4d5e"],
    "stepUpSessionId": "sess_9f3a7c2d8b6e4a1f"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Encrypted payload (on the wire)

**Request**

```json
{
  "agent": {
    "agentName": "string",
    "llmPlatform": "OPEN_AI",
    "llmVersion": "string"
  },
  "encryptedPayload": "<jwe-payload>",
  "enrollmentId": "string",
  "expirationTs": "2024-01-15T09:30:00Z",
  "prompt": {
    "promptSummary": "string"
  },
  "purchaseDecision": "NON-DELEGATED",
  "risk": {
    "device": {
      "deviceId": "string",
      "ipAddress": "string"
    },
    "order": {
      "includesGiftCard": "YES"
    }
  },
  "spendControl": {
    "currency": "string",
    "maxAmount": "string"
  }
}
```

**Response**

```json
{
  "availableChallenges": {
    "0": {
      "issuerSurface": {
        "authenticationToken": "string",
        "url": "string"
      },
      "type": "ISSUER_SURFACE"
    }
  },
  "enrollmentId": "string",
  "intentId": "string",
  "intentStatus": "PENDING_STEP_UP",
  "stepUpAuthenticationRequired": "YES",
  "stepUpSessionId": "string"
}
```

**SDK Code**

```python Encrypted payload (on the wire)
import requests

url = "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

payload = {
    "agent": {
        "agentName": "string",
        "llmPlatform": "OPEN_AI",
        "llmVersion": "string"
    },
    "encryptedPayload": "<jwe-payload>",
    "enrollmentId": "string",
    "expirationTs": "2024-01-15T09:30:00Z",
    "prompt": { "promptSummary": "string" },
    "purchaseDecision": "NON-DELEGATED",
    "risk": {
        "device": {
            "deviceId": "string",
            "ipAddress": "string"
        },
        "order": { "includesGiftCard": "YES" }
    },
    "spendControl": {
        "currency": "string",
        "maxAmount": "string"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "agentId": "agentId",
    "trackingId": "trackingId",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Encrypted payload (on the wire)
const url = 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId';
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <token>',
    agentId: 'agentId',
    trackingId: 'trackingId',
    'Content-Type': 'application/json'
  },
  body: '{"agent":{"agentName":"string","llmPlatform":"OPEN_AI","llmVersion":"string"},"encryptedPayload":"<jwe-payload>","enrollmentId":"string","expirationTs":"2024-01-15T09:30:00Z","prompt":{"promptSummary":"string"},"purchaseDecision":"NON-DELEGATED","risk":{"device":{"deviceId":"string","ipAddress":"string"},"order":{"includesGiftCard":"YES"}},"spendControl":{"currency":"string","maxAmount":"string"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Encrypted payload (on the wire)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId"

	payload := strings.NewReader("{\n  \"agent\": {\n    \"agentName\": \"string\",\n    \"llmPlatform\": \"OPEN_AI\",\n    \"llmVersion\": \"string\"\n  },\n  \"encryptedPayload\": \"<jwe-payload>\",\n  \"enrollmentId\": \"string\",\n  \"expirationTs\": \"2024-01-15T09:30:00Z\",\n  \"prompt\": {\n    \"promptSummary\": \"string\"\n  },\n  \"purchaseDecision\": \"NON-DELEGATED\",\n  \"risk\": {\n    \"device\": {\n      \"deviceId\": \"string\",\n      \"ipAddress\": \"string\"\n    },\n    \"order\": {\n      \"includesGiftCard\": \"YES\"\n    }\n  },\n  \"spendControl\": {\n    \"currency\": \"string\",\n    \"maxAmount\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("agentId", "agentId")
	req.Header.Add("trackingId", "trackingId")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Encrypted payload (on the wire)
require 'uri'
require 'net/http'

url = URI("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["agentId"] = 'agentId'
request["trackingId"] = 'trackingId'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"agent\": {\n    \"agentName\": \"string\",\n    \"llmPlatform\": \"OPEN_AI\",\n    \"llmVersion\": \"string\"\n  },\n  \"encryptedPayload\": \"<jwe-payload>\",\n  \"enrollmentId\": \"string\",\n  \"expirationTs\": \"2024-01-15T09:30:00Z\",\n  \"prompt\": {\n    \"promptSummary\": \"string\"\n  },\n  \"purchaseDecision\": \"NON-DELEGATED\",\n  \"risk\": {\n    \"device\": {\n      \"deviceId\": \"string\",\n      \"ipAddress\": \"string\"\n    },\n    \"order\": {\n      \"includesGiftCard\": \"YES\"\n    }\n  },\n  \"spendControl\": {\n    \"currency\": \"string\",\n    \"maxAmount\": \"string\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Encrypted payload (on the wire)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")
  .header("Authorization", "Bearer <token>")
  .header("agentId", "agentId")
  .header("trackingId", "trackingId")
  .header("Content-Type", "application/json")
  .body("{\n  \"agent\": {\n    \"agentName\": \"string\",\n    \"llmPlatform\": \"OPEN_AI\",\n    \"llmVersion\": \"string\"\n  },\n  \"encryptedPayload\": \"<jwe-payload>\",\n  \"enrollmentId\": \"string\",\n  \"expirationTs\": \"2024-01-15T09:30:00Z\",\n  \"prompt\": {\n    \"promptSummary\": \"string\"\n  },\n  \"purchaseDecision\": \"NON-DELEGATED\",\n  \"risk\": {\n    \"device\": {\n      \"deviceId\": \"string\",\n      \"ipAddress\": \"string\"\n    },\n    \"order\": {\n      \"includesGiftCard\": \"YES\"\n    }\n  },\n  \"spendControl\": {\n    \"currency\": \"string\",\n    \"maxAmount\": \"string\"\n  }\n}")
  .asString();
```

```php Encrypted payload (on the wire)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId', [
  'body' => '{
  "agent": {
    "agentName": "string",
    "llmPlatform": "OPEN_AI",
    "llmVersion": "string"
  },
  "encryptedPayload": "<jwe-payload>",
  "enrollmentId": "string",
  "expirationTs": "2024-01-15T09:30:00Z",
  "prompt": {
    "promptSummary": "string"
  },
  "purchaseDecision": "NON-DELEGATED",
  "risk": {
    "device": {
      "deviceId": "string",
      "ipAddress": "string"
    },
    "order": {
      "includesGiftCard": "YES"
    }
  },
  "spendControl": {
    "currency": "string",
    "maxAmount": "string"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'agentId' => 'agentId',
    'trackingId' => 'trackingId',
  ],
]);

echo $response->getBody();
```

```csharp Encrypted payload (on the wire)
using RestSharp;

var client = new RestClient("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("agentId", "agentId");
request.AddHeader("trackingId", "trackingId");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"agent\": {\n    \"agentName\": \"string\",\n    \"llmPlatform\": \"OPEN_AI\",\n    \"llmVersion\": \"string\"\n  },\n  \"encryptedPayload\": \"<jwe-payload>\",\n  \"enrollmentId\": \"string\",\n  \"expirationTs\": \"2024-01-15T09:30:00Z\",\n  \"prompt\": {\n    \"promptSummary\": \"string\"\n  },\n  \"purchaseDecision\": \"NON-DELEGATED\",\n  \"risk\": {\n    \"device\": {\n      \"deviceId\": \"string\",\n      \"ipAddress\": \"string\"\n    },\n    \"order\": {\n      \"includesGiftCard\": \"YES\"\n    }\n  },\n  \"spendControl\": {\n    \"currency\": \"string\",\n    \"maxAmount\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Encrypted payload (on the wire)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "agentId": "agentId",
  "trackingId": "trackingId",
  "Content-Type": "application/json"
]
let parameters = [
  "agent": [
    "agentName": "string",
    "llmPlatform": "OPEN_AI",
    "llmVersion": "string"
  ],
  "encryptedPayload": "<jwe-payload>",
  "enrollmentId": "string",
  "expirationTs": "2024-01-15T09:30:00Z",
  "prompt": ["promptSummary": "string"],
  "purchaseDecision": "NON-DELEGATED",
  "risk": [
    "device": [
      "deviceId": "string",
      "ipAddress": "string"
    ],
    "order": ["includesGiftCard": "YES"]
  ],
  "spendControl": [
    "currency": "string",
    "maxAmount": "string"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/intents/intentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```