> 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.

# Capture the outcome of the payment authorization for which the payment credentials were used

POST https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/paymentcredentials/complete
Content-Type: application/json

Provides acknowledgement from the Partner when the payment authorization is decisioned.

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

## 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

### 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 a PaymentCredentialsCompleteRequest.

- `authIdentifier` (string, required) — A unique identifier for the authorization request.
- `authStatus` (enum, required) — The authorization outcome for the request.
  - Allowed values: `APPROVED`, `DECLINED`, `RETURNED`
- `tokenNumber` (string, required) — The tokenized account number used for the transaction.
- `orderContext` (PaymentCredentialsOrderContext, optional) — The order details associated with the authorization. Required when input is tokenNumber.

## Response

### 204

Successful response

## 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

### PaymentCredentialsOrderContext

Order details used to generate payment credentials, including merchants and associated items.

### 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`

### PaymentCredentialsOrderContext0

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

### PaymentCredentialsOrderContext1

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

### 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.

### 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

**Request**

```json
{
  "authIdentifier": "string",
  "authStatus": "APPROVED",
  "tokenNumber": "string",
  "orderContext": {
    "allowPartialOrder": "YES",
    "currency": "string",
    "items": [
      {
        "brand": "string",
        "category": "string",
        "condition": "string",
        "currency": "string",
        "imageLink": "string",
        "isGiftCard": "YES",
        "isRecurBill": "YES",
        "isRefundable": "YES",
        "itemId": "string",
        "merchantId": 0,
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "name": "string",
        "purchaseCriteria": {
          "0": {
            "currency": "string",
            "dependentItems": {
              "0": {
                "dependentItemId": "string"
              }
            },
            "fromDate": "2019-08-24T14:15:22Z",
            "isShippingIncluded": "YES",
            "maxAmount": "string",
            "minAmount": "string",
            "pricePreference": "MINIMUM_PRICE",
            "toDate": "2019-08-24T14:15:22Z",
            "type": "PRICE"
          }
        },
        "quantity": 0,
        "unitAmount": "string"
      }
    ],
    "merchants": [
      {
        "categoryName": "string",
        "merchantId": 0,
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "name": "string",
        "policies": {
          "returnPolicy": "string",
          "returnWindow": "string",
          "termsOfService": "string"
        },
        "seNumber": "string",
        "sellerId": "string",
        "url": "string"
      }
    ],
    "orderId": "string",
    "totalAmount": "string",
    "type": "INTENT"
  }
}
```

**SDK Code**

```python Payment Credentials_complete_example
import requests

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

payload = {
    "authIdentifier": "string",
    "authStatus": "APPROVED",
    "tokenNumber": "string",
    "orderContext": {
        "allowPartialOrder": "YES",
        "currency": "string",
        "items": [
            {
                "brand": "string",
                "category": "string",
                "condition": "string",
                "currency": "string",
                "imageLink": "string",
                "isGiftCard": "YES",
                "isRecurBill": "YES",
                "isRefundable": "YES",
                "itemId": "string",
                "merchantId": 0,
                "metadata": {
                    "property1": "string",
                    "property2": "string"
                },
                "name": "string",
                "purchaseCriteria": { "0": {
                        "currency": "string",
                        "dependentItems": { "0": { "dependentItemId": "string" } },
                        "fromDate": "2019-08-24T14:15:22Z",
                        "isShippingIncluded": "YES",
                        "maxAmount": "string",
                        "minAmount": "string",
                        "pricePreference": "MINIMUM_PRICE",
                        "toDate": "2019-08-24T14:15:22Z",
                        "type": "PRICE"
                    } },
                "quantity": 0,
                "unitAmount": "string"
            }
        ],
        "merchants": [
            {
                "categoryName": "string",
                "merchantId": 0,
                "metadata": {
                    "property1": "string",
                    "property2": "string"
                },
                "name": "string",
                "policies": {
                    "returnPolicy": "string",
                    "returnWindow": "string",
                    "termsOfService": "string"
                },
                "seNumber": "string",
                "sellerId": "string",
                "url": "string"
            }
        ],
        "orderId": "string",
        "totalAmount": "string",
        "type": "INTENT"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "agentId": "agentId",
    "trackingId": "trackingId",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Payment Credentials_complete_example
const url = 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/paymentcredentials/complete';
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    agentId: 'agentId',
    trackingId: 'trackingId',
    'Content-Type': 'application/json'
  },
  body: '{"authIdentifier":"string","authStatus":"APPROVED","tokenNumber":"string","orderContext":{"allowPartialOrder":"YES","currency":"string","items":[{"brand":"string","category":"string","condition":"string","currency":"string","imageLink":"string","isGiftCard":"YES","isRecurBill":"YES","isRefundable":"YES","itemId":"string","merchantId":0,"metadata":{"property1":"string","property2":"string"},"name":"string","purchaseCriteria":{"0":{"currency":"string","dependentItems":{"0":{"dependentItemId":"string"}},"fromDate":"2019-08-24T14:15:22Z","isShippingIncluded":"YES","maxAmount":"string","minAmount":"string","pricePreference":"MINIMUM_PRICE","toDate":"2019-08-24T14:15:22Z","type":"PRICE"}},"quantity":0,"unitAmount":"string"}],"merchants":[{"categoryName":"string","merchantId":0,"metadata":{"property1":"string","property2":"string"},"name":"string","policies":{"returnPolicy":"string","returnWindow":"string","termsOfService":"string"},"seNumber":"string","sellerId":"string","url":"string"}],"orderId":"string","totalAmount":"string","type":"INTENT"}}'
};

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

```go Payment Credentials_complete_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"authIdentifier\": \"string\",\n  \"authStatus\": \"APPROVED\",\n  \"tokenNumber\": \"string\",\n  \"orderContext\": {\n    \"allowPartialOrder\": \"YES\",\n    \"currency\": \"string\",\n    \"items\": [\n      {\n        \"brand\": \"string\",\n        \"category\": \"string\",\n        \"condition\": \"string\",\n        \"currency\": \"string\",\n        \"imageLink\": \"string\",\n        \"isGiftCard\": \"YES\",\n        \"isRecurBill\": \"YES\",\n        \"isRefundable\": \"YES\",\n        \"itemId\": \"string\",\n        \"merchantId\": 0,\n        \"metadata\": {\n          \"property1\": \"string\",\n          \"property2\": \"string\"\n        },\n        \"name\": \"string\",\n        \"purchaseCriteria\": {\n          \"0\": {\n            \"currency\": \"string\",\n            \"dependentItems\": {\n              \"0\": {\n                \"dependentItemId\": \"string\"\n              }\n            },\n            \"fromDate\": \"2019-08-24T14:15:22Z\",\n            \"isShippingIncluded\": \"YES\",\n            \"maxAmount\": \"string\",\n            \"minAmount\": \"string\",\n            \"pricePreference\": \"MINIMUM_PRICE\",\n            \"toDate\": \"2019-08-24T14:15:22Z\",\n            \"type\": \"PRICE\"\n          }\n        },\n        \"quantity\": 0,\n        \"unitAmount\": \"string\"\n      }\n    ],\n    \"merchants\": [\n      {\n        \"categoryName\": \"string\",\n        \"merchantId\": 0,\n        \"metadata\": {\n          \"property1\": \"string\",\n          \"property2\": \"string\"\n        },\n        \"name\": \"string\",\n        \"policies\": {\n          \"returnPolicy\": \"string\",\n          \"returnWindow\": \"string\",\n          \"termsOfService\": \"string\"\n        },\n        \"seNumber\": \"string\",\n        \"sellerId\": \"string\",\n        \"url\": \"string\"\n      }\n    ],\n    \"orderId\": \"string\",\n    \"totalAmount\": \"string\",\n    \"type\": \"INTENT\"\n  }\n}")

	req, _ := http.NewRequest("POST", 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 Payment Credentials_complete_example
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["agentId"] = 'agentId'
request["trackingId"] = 'trackingId'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"authIdentifier\": \"string\",\n  \"authStatus\": \"APPROVED\",\n  \"tokenNumber\": \"string\",\n  \"orderContext\": {\n    \"allowPartialOrder\": \"YES\",\n    \"currency\": \"string\",\n    \"items\": [\n      {\n        \"brand\": \"string\",\n        \"category\": \"string\",\n        \"condition\": \"string\",\n        \"currency\": \"string\",\n        \"imageLink\": \"string\",\n        \"isGiftCard\": \"YES\",\n        \"isRecurBill\": \"YES\",\n        \"isRefundable\": \"YES\",\n        \"itemId\": \"string\",\n        \"merchantId\": 0,\n        \"metadata\": {\n          \"property1\": \"string\",\n          \"property2\": \"string\"\n        },\n        \"name\": \"string\",\n        \"purchaseCriteria\": {\n          \"0\": {\n            \"currency\": \"string\",\n            \"dependentItems\": {\n              \"0\": {\n                \"dependentItemId\": \"string\"\n              }\n            },\n            \"fromDate\": \"2019-08-24T14:15:22Z\",\n            \"isShippingIncluded\": \"YES\",\n            \"maxAmount\": \"string\",\n            \"minAmount\": \"string\",\n            \"pricePreference\": \"MINIMUM_PRICE\",\n            \"toDate\": \"2019-08-24T14:15:22Z\",\n            \"type\": \"PRICE\"\n          }\n        },\n        \"quantity\": 0,\n        \"unitAmount\": \"string\"\n      }\n    ],\n    \"merchants\": [\n      {\n        \"categoryName\": \"string\",\n        \"merchantId\": 0,\n        \"metadata\": {\n          \"property1\": \"string\",\n          \"property2\": \"string\"\n        },\n        \"name\": \"string\",\n        \"policies\": {\n          \"returnPolicy\": \"string\",\n          \"returnWindow\": \"string\",\n          \"termsOfService\": \"string\"\n        },\n        \"seNumber\": \"string\",\n        \"sellerId\": \"string\",\n        \"url\": \"string\"\n      }\n    ],\n    \"orderId\": \"string\",\n    \"totalAmount\": \"string\",\n    \"type\": \"INTENT\"\n  }\n}"

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

```java Payment Credentials_complete_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/paymentcredentials/complete")
  .header("Authorization", "Bearer <token>")
  .header("agentId", "agentId")
  .header("trackingId", "trackingId")
  .header("Content-Type", "application/json")
  .body("{\n  \"authIdentifier\": \"string\",\n  \"authStatus\": \"APPROVED\",\n  \"tokenNumber\": \"string\",\n  \"orderContext\": {\n    \"allowPartialOrder\": \"YES\",\n    \"currency\": \"string\",\n    \"items\": [\n      {\n        \"brand\": \"string\",\n        \"category\": \"string\",\n        \"condition\": \"string\",\n        \"currency\": \"string\",\n        \"imageLink\": \"string\",\n        \"isGiftCard\": \"YES\",\n        \"isRecurBill\": \"YES\",\n        \"isRefundable\": \"YES\",\n        \"itemId\": \"string\",\n        \"merchantId\": 0,\n        \"metadata\": {\n          \"property1\": \"string\",\n          \"property2\": \"string\"\n        },\n        \"name\": \"string\",\n        \"purchaseCriteria\": {\n          \"0\": {\n            \"currency\": \"string\",\n            \"dependentItems\": {\n              \"0\": {\n                \"dependentItemId\": \"string\"\n              }\n            },\n            \"fromDate\": \"2019-08-24T14:15:22Z\",\n            \"isShippingIncluded\": \"YES\",\n            \"maxAmount\": \"string\",\n            \"minAmount\": \"string\",\n            \"pricePreference\": \"MINIMUM_PRICE\",\n            \"toDate\": \"2019-08-24T14:15:22Z\",\n            \"type\": \"PRICE\"\n          }\n        },\n        \"quantity\": 0,\n        \"unitAmount\": \"string\"\n      }\n    ],\n    \"merchants\": [\n      {\n        \"categoryName\": \"string\",\n        \"merchantId\": 0,\n        \"metadata\": {\n          \"property1\": \"string\",\n          \"property2\": \"string\"\n        },\n        \"name\": \"string\",\n        \"policies\": {\n          \"returnPolicy\": \"string\",\n          \"returnWindow\": \"string\",\n          \"termsOfService\": \"string\"\n        },\n        \"seNumber\": \"string\",\n        \"sellerId\": \"string\",\n        \"url\": \"string\"\n      }\n    ],\n    \"orderId\": \"string\",\n    \"totalAmount\": \"string\",\n    \"type\": \"INTENT\"\n  }\n}")
  .asString();
```

```php Payment Credentials_complete_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/paymentcredentials/complete', [
  'body' => '{
  "authIdentifier": "string",
  "authStatus": "APPROVED",
  "tokenNumber": "string",
  "orderContext": {
    "allowPartialOrder": "YES",
    "currency": "string",
    "items": [
      {
        "brand": "string",
        "category": "string",
        "condition": "string",
        "currency": "string",
        "imageLink": "string",
        "isGiftCard": "YES",
        "isRecurBill": "YES",
        "isRefundable": "YES",
        "itemId": "string",
        "merchantId": 0,
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "name": "string",
        "purchaseCriteria": {
          "0": {
            "currency": "string",
            "dependentItems": {
              "0": {
                "dependentItemId": "string"
              }
            },
            "fromDate": "2019-08-24T14:15:22Z",
            "isShippingIncluded": "YES",
            "maxAmount": "string",
            "minAmount": "string",
            "pricePreference": "MINIMUM_PRICE",
            "toDate": "2019-08-24T14:15:22Z",
            "type": "PRICE"
          }
        },
        "quantity": 0,
        "unitAmount": "string"
      }
    ],
    "merchants": [
      {
        "categoryName": "string",
        "merchantId": 0,
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "name": "string",
        "policies": {
          "returnPolicy": "string",
          "returnWindow": "string",
          "termsOfService": "string"
        },
        "seNumber": "string",
        "sellerId": "string",
        "url": "string"
      }
    ],
    "orderId": "string",
    "totalAmount": "string",
    "type": "INTENT"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'agentId' => 'agentId',
    'trackingId' => 'trackingId',
  ],
]);

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

```csharp Payment Credentials_complete_example
using RestSharp;

var client = new RestClient("https://apisandboxm.americanexpress.com/payments/digital/v1/agentic-commerce/paymentcredentials/complete");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("agentId", "agentId");
request.AddHeader("trackingId", "trackingId");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"authIdentifier\": \"string\",\n  \"authStatus\": \"APPROVED\",\n  \"tokenNumber\": \"string\",\n  \"orderContext\": {\n    \"allowPartialOrder\": \"YES\",\n    \"currency\": \"string\",\n    \"items\": [\n      {\n        \"brand\": \"string\",\n        \"category\": \"string\",\n        \"condition\": \"string\",\n        \"currency\": \"string\",\n        \"imageLink\": \"string\",\n        \"isGiftCard\": \"YES\",\n        \"isRecurBill\": \"YES\",\n        \"isRefundable\": \"YES\",\n        \"itemId\": \"string\",\n        \"merchantId\": 0,\n        \"metadata\": {\n          \"property1\": \"string\",\n          \"property2\": \"string\"\n        },\n        \"name\": \"string\",\n        \"purchaseCriteria\": {\n          \"0\": {\n            \"currency\": \"string\",\n            \"dependentItems\": {\n              \"0\": {\n                \"dependentItemId\": \"string\"\n              }\n            },\n            \"fromDate\": \"2019-08-24T14:15:22Z\",\n            \"isShippingIncluded\": \"YES\",\n            \"maxAmount\": \"string\",\n            \"minAmount\": \"string\",\n            \"pricePreference\": \"MINIMUM_PRICE\",\n            \"toDate\": \"2019-08-24T14:15:22Z\",\n            \"type\": \"PRICE\"\n          }\n        },\n        \"quantity\": 0,\n        \"unitAmount\": \"string\"\n      }\n    ],\n    \"merchants\": [\n      {\n        \"categoryName\": \"string\",\n        \"merchantId\": 0,\n        \"metadata\": {\n          \"property1\": \"string\",\n          \"property2\": \"string\"\n        },\n        \"name\": \"string\",\n        \"policies\": {\n          \"returnPolicy\": \"string\",\n          \"returnWindow\": \"string\",\n          \"termsOfService\": \"string\"\n        },\n        \"seNumber\": \"string\",\n        \"sellerId\": \"string\",\n        \"url\": \"string\"\n      }\n    ],\n    \"orderId\": \"string\",\n    \"totalAmount\": \"string\",\n    \"type\": \"INTENT\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Payment Credentials_complete_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "agentId": "agentId",
  "trackingId": "trackingId",
  "Content-Type": "application/json"
]
let parameters = [
  "authIdentifier": "string",
  "authStatus": "APPROVED",
  "tokenNumber": "string",
  "orderContext": [
    "allowPartialOrder": "YES",
    "currency": "string",
    "items": [
      [
        "brand": "string",
        "category": "string",
        "condition": "string",
        "currency": "string",
        "imageLink": "string",
        "isGiftCard": "YES",
        "isRecurBill": "YES",
        "isRefundable": "YES",
        "itemId": "string",
        "merchantId": 0,
        "metadata": [
          "property1": "string",
          "property2": "string"
        ],
        "name": "string",
        "purchaseCriteria": ["0": [
            "currency": "string",
            "dependentItems": ["0": ["dependentItemId": "string"]],
            "fromDate": "2019-08-24T14:15:22Z",
            "isShippingIncluded": "YES",
            "maxAmount": "string",
            "minAmount": "string",
            "pricePreference": "MINIMUM_PRICE",
            "toDate": "2019-08-24T14:15:22Z",
            "type": "PRICE"
          ]],
        "quantity": 0,
        "unitAmount": "string"
      ]
    ],
    "merchants": [
      [
        "categoryName": "string",
        "merchantId": 0,
        "metadata": [
          "property1": "string",
          "property2": "string"
        ],
        "name": "string",
        "policies": [
          "returnPolicy": "string",
          "returnWindow": "string",
          "termsOfService": "string"
        ],
        "seNumber": "string",
        "sellerId": "string",
        "url": "string"
      ]
    ],
    "orderId": "string",
    "totalAmount": "string",
    "type": "INTENT"
  ]
] 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/paymentcredentials/complete")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```