---
page_title: Fetch Payment Credentials
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/visa-agentic-transactions/fetch-payment-credentials
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fvisa-agentic-transactions%2Ffetch-payment-credentials
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# Fetch VIC Payment Credentials



Fetch the payment credentials which will be used in the merchant app ## Endpoints:
- Sandbox: https://sandbox.juspay.in/cards/fetchAgenticTransactCreds

- Production: https://api.juspay.in/cards/fetchAgenticTransactCreds

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

> **Note**
> Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==


- Value: MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: String, Mandatory
## Headers:

#### x-merchantid:
Merchantid of the AI Agent to be passed here
- Tags: String, Mandatory
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
{
    "networkType": "VISA",
    "vProvisionedTokenId": "xxxxxxxxxxxxxxxxxxxxxx",
    "clientReferenceId": "some-client-ref-id",
    "nwTransactionId": "some-txn-id-1",
    "transactionDetails": [
        {
            "transactionId": "txn-ref-123",
            "transactionType": "PURCHASE",
            "transactionAmount": {
                "totalAmount": 11.10,
                "subTotalAmount": 11.10,
                "tax": 0.00,
                "currencyCode": "USD"
            },
            "orderId": "merch-ord-123",
            "shippingAddress": {
                "addLine1": "123 Main St",
                "city": "Greater Noida",
                "stateAdd": "Uttar Pradesh",
                "postalCode": "201310",
                "countryCode": "US"
            },
            "acquirerDetails": {
                "acquirerMerchantId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "acquirerBin": "123456789"
            },
            "merchantDetails": {
                "mercNname": "Best Buy",
                "categoryCode": "5999",
                "url": "https://www.bestbuy.com",
                "countryCode": "US"
            },
            "deliveryMethod": "ADDRESS_ON_FILE",
            "productDetails": [
                {
                    "pId": "pid123",
                    "pName": "Balloons",
                    "quantity": 10,
                    "price": 11.10,
                    "unitPriceAmount": 1.10,
                    "unitPriceCurrenyCode": "USD"
                }
            ]
        }
    ]
}

```

### Response:

#### Success Response:
```plaintext
{
    "status": "SUCCESS",
    "responseCode": null,
    "responseMessage": null,
    "payload" : {
        "tokenDetails": {
            "token": "12344",
            "expMonth": "03",
            "expYear": "2023",
            "dynamicDataType": "DTVV",
            "dynamicDataValue": "123"
        },
        "transactionRefId": "transac-ref-id",
        "nwStatus": "SUCCESS",
        "metadata": "<some-json-value>"
    }
}

```

#### Failure Response:
```plaintext
{
    "status": "FAILURE",
    "payload": null,
    "responseCode": "Invalid transactionId format",
    "responseMessage": "The intent type was not passed"
}

```

## Body Parameters:
### Request Body:

#### networkType:
- Description: VISA
- Value: value
- Tags: ENUM, Mandatory

#### vProvisionedTokenId:
- Description: Token id of the card at VISA Side
- Tags: String, Mandatory

#### clientReferenceId:
- Description: Session identifier of VISA for the transaction
- Tags: String, Mandatory

#### nwTransactionId:
- Description: Unique transaction id to identify the transaction
- Tags: String, Mandatory

#### transactionDetails:
- Description: Transaction related information
- Value:
  - **TransactionId**:
    - Value: txn-ref-123
    - Tags: String
  - **TransactionType**:
    - Value: PURCHASE
    - Tags: String
  - **TransactionAmount**:
    - Value:
      - **TotalAmount**:
        - Value: 11.1
        - Tags: String
      - **SubTotalAmount**:
        - Value: 11.1
        - Tags: String
      - **Tax**:
        - Value: 0
        - Tags: String
      - **CurrencyCode**:
        - Value: USD
        - Tags: String
    - Tags: Object
  - **OrderId**:
    - Value: merch-ord-123
    - Tags: String
  - **ShippingAddress**:
    - Value:
      - **AddLine1**:
        - Value: 123 Main St
        - Tags: String
      - **City**:
        - Value: Greater Noida
        - Tags: String
      - **StateAdd**:
        - Value: Uttar Pradesh
        - Tags: String
      - **PostalCode**:
        - Value: 201310
        - Tags: String
      - **CountryCode**:
        - Value: US
        - Tags: String
    - Tags: Object
  - **AcquirerDetails**:
    - Value:
      - **AcquirerMerchantId**:
        - Value: d48ac10b-58cc-4372-a567-0e02b2c3d489
        - Tags: String
      - **AcquirerBin**:
        - Value: 123456789
        - Tags: String
    - Tags: Object
  - **MerchantDetails**:
    - Value:
      - **MercNname**:
        - Value: Best Buy
        - Tags: String
      - **CategoryCode**:
        - Value: 5999
        - Tags: String
      - **Url**:
        - Value: https://www.bestbuy.com
        - Tags: String
      - **CountryCode**:
        - Value: US
        - Tags: String
    - Tags: Object
  - **DeliveryMethod**:
    - Value: ADDRESS_ON_FILE
    - Tags: String
  - **ProductDetails**:
    - Tags: Array
- Tags: String, Mandatory
## API Responses:
### 200:

#### status:
- Value: SUCCESS
- Tags: String

#### responseCode:

#### responseMessage:

#### payload:
- Value:
  - **TokenDetails**:
    - Value:
      - **Token**:
        - Value: 12344
        - Tags: String
      - **ExpMonth**:
        - Value: 03
        - Tags: String
      - **ExpYear**:
        - Value: 2023
        - Tags: String
      - **DynamicDataType**:
        - Value: DTVV
        - Tags: String
      - **DynamicDataValue**:
        - Value: 123
        - Tags: String
    - Tags: Object
  - **TransactionRefId**:
    - Value: transac-ref-id
    - Tags: String
  - **NwStatus**:
    - Value: SUCCESS
    - Tags: String
  - **Metadata**:
    - Value: <some-json-value>
    - Tags: String
- Tags: Object


---

## See Also

- [Setup Agentic Payment](https://juspay.io/in/docs/api-reference/docs/visa-agentic-transactions/setup-agentic-payment)
