> For the complete documentation index, see [llms.txt](https://docs.payshield.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payshield.ai/txfind-payreveal-order-insight-ican/merchant/update-transaction-details.md).

# Update Transaction Details

<mark style="color:green;">`POST`</mark> `https://{baseUrl}/api/v2/merchant/{merchantId}/updateTransactionDetails`

The **Authorization Header** is required if JWT (JSON Web Token) authentication is enabled in the application configuration (`config.server.jwt_enable` is `true`). This header must contain a valid JWT token prefixed with the word "Bearer". The token is used to authenticate the request and verify that the sender is authorized to perform the requested operation.

The **Request Body** must be an array containing exactly one object. This object includes the details for updating a transaction.

This endpoint is used to update the transaction details for a specific merchant identified by `merchantId`. The update is performed on the transaction record based on the provided `txShieldOICartReference`. The updated transaction details are stored in MongoDB and, if applicable, in AWS DynamoDB.

### **Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

### Path Parameters&#x20;

| Name         | Description                        |
| ------------ | ---------------------------------- |
| `merchantId` | Merchant Id for update transaction |

### **Body**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>txShieldOICartReference</code></td><td>String</td><td>True</td><td>A unique reference for the transaction that needs to be updated. This is a mandatory field.</td></tr></tbody></table>

## Update Transaction Details

> Update Merchant Transaction based on the txShieldOICartReference

```json
{"openapi":"3.0.1","info":{"title":"TxFind API's Version 2 Endpoints","version":"2.0.0"},"tags":[{"name":"Merchant","description":"Call related to merchant transaction."}],"servers":[{"url":"https://{baseUrl}","description":"Current server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/api/v2/merchant/{merchantId}/updateTransactionDetails":{"post":{"tags":["Merchant"],"summary":"Update Transaction Details","description":"Update Merchant Transaction based on the txShieldOICartReference","operationId":"merchantUpdateTransactionDetails","parameters":[{"name":"merchantId","in":"path","description":"Merchant Id for update transaction","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["txShieldOICartReference"],"properties":{"txShieldOICartReference":{"type":"string","description":"The unique reference for the transaction to be updated."},"cardBin":{"type":"string","description":"First 6 or 8 digits of the card used in the transaction."},"cardLast4":{"type":"string","description":"Last 4 digits of the card used in the transaction."},"receipt":{"type":"object","properties":{"productsPurchasedList":{"type":"array","items":{"type":"object","properties":{"productDescription":{"type":"string","description":"Updated description of the product."},"deliveryDetails":{"type":"object","properties":{"deliveryStatus":{"type":"string","description":"Updated status of the delivery."},"dateOfShipment":{"type":"string","format":"date-time","description":"Updated date the item was shipped."}}}}}}}},"customerInformation":{"type":"object","properties":{"emailAddress":{"type":"string","format":"email","description":"Updated customer email address."}}}}}}}}},"responses":{"200":{"description":"Successful update","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"msg":{"type":"string"},"txShieldOICartReference":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"},"error":{"type":"string"}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payshield.ai/txfind-payreveal-order-insight-ican/merchant/update-transaction-details.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
