# Store Transaction Details

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

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 of the transaction and payment information.

This endpoint is used to store transaction details for a merchant identified by `merchantId`. The endpoint validates the request body, checks the merchant's enrollment, and stores the transaction data in both MongoDB and optionally in AWS DynamoDB.

### **Headers**

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

### Path Parameters

<table><thead><tr><th width="374">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>merchantId</code></td><td>Merchant Id for create transaction</td></tr></tbody></table>

### **Body**

<table data-full-width="true"><thead><tr><th>Name</th><th width="191">Type</th><th width="158">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>cardBin</code></td><td>String</td><td>True</td><td>The six or eight-digit card Issuer BIN that is<br>associated with the purchase.</td></tr><tr><td><code>cardLast4</code></td><td>String</td><td>True</td><td>The last four digits of the card number<br>associated with the purchase.</td></tr><tr><td><code>transactionDate</code></td><td>String</td><td>True</td><td>Purchase transaction date in UTC format.</td></tr><tr><td><code>paymentDescriptor</code></td><td>String</td><td>True</td><td>The Merchant name component of the<br>billing descriptor which appears on the<br>customer's transaction statement.</td></tr><tr><td><code>receipt</code></td><td>Object</td><td>True</td><td>Object containing transaction details like payment information and purchased products.</td></tr><tr><td><code>receipt.paymentInformation</code></td><td>Object</td><td>True</td><td>Object containing payment details.</td></tr><tr><td><code>receipt.paymentInformation.paymentTotalAmount</code></td><td>Object</td><td>True</td><td>Object containing the total amount and currency.</td></tr><tr><td><code>receipt.paymentInformation.paymentTotalAmount.amount</code></td><td>Number</td><td>True</td><td>The total payment amount.</td></tr><tr><td><code>receipt.paymentInformation.paymentTotalAmount.currency</code></td><td>String</td><td>True</td><td>The currency of the payment.</td></tr><tr><td><code>receipt.productsPurchasedList</code></td><td>Array</td><td>True</td><td>List of products purchased in the transaction.</td></tr><tr><td><code>receipt.productsPurchasedList[].productDescription</code></td><td>String</td><td>True</td><td>Detailed description of the product<br>(merchandise or service) purchased.</td></tr><tr><td><code>merchantInformation</code></td><td>Object</td><td>True</td><td>Object containing information about the merchant.</td></tr><tr><td><code>merchantInformation.merchantName</code></td><td>String</td><td>True</td><td>Corporate or Parent company name of the<br>Merchant, may or may not be recognizable<br>to the consumer. May be the name on file<br>with your Acquirer/Merchant Account<br>provider.<br>Required on</td></tr><tr><td><code>merchantInformation.merchantUrl</code></td><td>String</td><td>True</td><td>Merchant corporate business URL.<br>May or may NOT be different from the<br>websiteUrl the purchase was made from.</td></tr><tr><td><code>merchantInformation.merchantContactPhone</code></td><td>String</td><td>True</td><td>Merchant’s customer service phone<br>number. Should be the number you would<br>want a consumer to contact you to discuss<br>any questions they may have about the<br>purchase.<br>Must be in E.164 format (“+” , 3-digit country<br>code, 12-digit telephone number).</td></tr><tr><td><code>merchantInformation.storeDetails</code></td><td>Object</td><td>True</td><td>Object containing details about the merchant's store.</td></tr><tr><td><code>merchantInformation.storeDetails.storeName</code></td><td>String</td><td>True</td><td>Store/Webstore name where purchase<br>was made. Should be recognizable to the<br>consumer</td></tr><tr><td><code>customerInformation</code></td><td>Object</td><td>True (Conditionally)</td><td>Object containing information about the customer, required for "CE" merchants.</td></tr><tr><td><code>customerInformation.accountId</code></td><td>String</td><td>True (Conditionally)</td><td>Cardholder registered identifier to<br>uniquely identify their account with the<br>Merchant. This should be recognizable<br>to the Cardholder (not an internal system<br>identifier) and something they provided the<br>Merchant during account creation.<br>Examples are a unique username, email,<br>phone number or other similar value.<br>If a “guest” checkout option was used or the<br>Cardholder has NOT established/registered<br>an account with the Merchant this field<br>is not to be used.<br>Required for "CE" merchants if <code>deliveryAddress</code> is not provided.</td></tr><tr><td><code>deliveryAddress</code></td><td>Object</td><td>True (Conditionally)</td><td>Required for "CE" merchants if <code>accountId</code> is not provided.</td></tr><tr><td><code>deliveryAddress.address1</code></td><td>String</td><td>True (Conditionally)</td><td>Street address plus additional address lines<br>such as suite number, apartment, etc.<br>Required if the merchant enrollment is "CE" or based on specific conditions.</td></tr><tr><td><code>device</code></td><td>Object</td><td>True (Conditionally)</td><td>Required for "CE" merchants or if additional security checks are needed.</td></tr><tr><td><code>device.deviceId</code></td><td>String</td><td>True (Conditionally)</td><td>Device ID of the device used to submit<br>order. <br>Example values from device:<br>• IMEI<br>• MEID<br>Required if other device fields are not provided.</td></tr><tr><td><code>device.ipAddress</code></td><td>String</td><td>True (Conditionally)</td><td>IP Address associated with the device. Only<br>Public IP Addresses should be provided<br>Required if other device fields are not provided.</td></tr><tr><td><code>device.deviceFingerprint</code></td><td>String</td><td>True (Conditionally)</td><td>Device fingerprint information is generated<br>by a third-party service provider or the<br>Merchant’s own algorithm to combine<br>browser or device attributes to form a<br>unique fingerprint to identify the device.<br>Required if other device fields are not provided.</td></tr></tbody></table>

## Store Transaction Details

> Storing Merchant Transaction

```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}/transactionDetails":{"post":{"tags":["Merchant"],"summary":"Store Transaction Details","description":"Storing Merchant Transaction","operationId":"merchantTransactionDetails","parameters":[{"name":"merchantId","in":"path","description":"Merchant Id for create transaction","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["cardBin","cardLast4","transactionDate","paymentDescriptor","receipt","merchantInformation"],"properties":{"cardBin":{"type":"string","description":"First 6 or 8 digits of the card used in the transaction. Must be numeric.","minLength":6,"maxLength":8,"pattern":"^[0-9]+$"},"cardLast4":{"type":"string","description":"Last 4 digits of the card used in the transaction. Must be numeric.","minLength":4,"maxLength":4,"pattern":"^[0-9]+$"},"transactionDate":{"type":"string","format":"date-time","description":"The date and time of the transaction in ISO 8601 format. Must be earlier than today."},"paymentDescriptor":{"type":"string","description":"Payment descriptor identifying the transaction.","maxLength":25},"arn":{"type":"string","description":"Acquirer Reference Number.","maxLength":24},"authCode":{"type":"string","description":"Authorization code for the transaction.","maxLength":6},"receipt":{"type":"object","required":["productsPurchasedList"],"properties":{"orderDate":{"type":"string","format":"date-time","description":"The date and time when the order was placed."},"orderNumber":{"type":"string","maxLength":25,"description":"The unique identifier for the order defined by the Merchant."},"purchaseCategory":{"type":"string","maxLength":20,"description":"The type of purchase made (MERCHANDISE or SERVICE)."},"invoiceNumber":{"type":"string","maxLength":25,"description":"The invoice number related to the order."},"downloadDateTime":{"type":"string","format":"date-time","description":"The date and time when a digital download was completed, if applicable."},"subTotalAmount":{"type":"object","description":"The subtotal before tax and shipping fees.","properties":{"amount":{"type":"number","format":"float","description":"The subtotal amount."},"currency":{"type":"string","maxLength":3,"description":"Currency in ISO 4217 3-letter format."}}},"taxAmount":{"type":"object","description":"The tax amount applied to the purchase.","properties":{"amount":{"type":"number","format":"float","description":"The total tax amount."},"currency":{"type":"string","maxLength":3,"description":"Currency in ISO 4217 3-letter format."}}},"taxDescription":{"type":"string","maxLength":100,"description":"Description of the tax applied."},"shippingAndHandlingAmount":{"type":"object","description":"The shipping and handling fee amount.","properties":{"amount":{"type":"number","format":"float","description":"Shipping and handling cost."},"currency":{"type":"string","maxLength":3,"description":"Currency in ISO 4217 3-letter format."}}},"orderTotalAmount":{"type":"object","description":"The total order amount including all charges.","properties":{"amount":{"type":"number","format":"float","description":"The final total amount."},"currency":{"type":"string","maxLength":3,"description":"Currency in ISO 4217 3-letter format."}}},"paymentInformation":{"type":"object","description":"Payment information for the order.","properties":{"paymentMethod":{"type":"string","maxLength":45,"description":"Masked representation of the payment card, showing last 4 digits."},"billingName":{"type":"string","maxLength":50,"description":"Full name of the cardholder used for billing."},"billingAddressDetails":{"type":"object","description":"Billing address details of the cardholder.","properties":{"address1":{"type":"string","maxLength":50,"description":"Primary address line."},"address2":{"type":"string","maxLength":50,"description":"Secondary address line (optional)."},"city":{"type":"string","maxLength":50,"description":"City name."},"region":{"type":"string","maxLength":3,"description":"State, province, or region (e.g., CA, ON)."},"postalCode":{"type":"string","maxLength":9,"description":"Postal or ZIP code."},"country":{"type":"string","maxLength":3,"description":"Country in ISO 3166-1 alpha-3 format."}}},"paymentSubTotalAmount":{"type":"object","description":"Subtotal of the payment amount.","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string","maxLength":3}}},"paymentTotalBeforeTax":{"type":"object","description":"Total before tax applied.","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string","maxLength":3}}},"paymentTaxAmount":{"type":"object","description":"Tax amount applied to the payment.","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string","maxLength":3}}},"paymentTaxDescription":{"type":"string","maxLength":100,"description":"Description of the tax applied."},"paymentTotalAmount":{"type":"object","description":"Total amount charged.","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string","maxLength":3}}},"cvvChecked":{"type":"boolean","description":"Indicates whether CVV check was performed during the transaction."}}},"productsPurchasedList":{"type":"array","description":"A list of products or services purchased in the order.","minItems":1,"items":{"type":"object","required":["productDescription"],"properties":{"productType":{"type":"string","maxLength":20,"description":"Category or type of product."},"productDescription":{"type":"string","description":"Description of the product.","maxLength":1000},"productUrl":{"type":"string","format":"uri","maxLength":1000,"description":"URL to the product detail page."},"artistOrSeller":{"type":"string","maxLength":100,"description":"Name of the artist or seller of the product."},"unitPriceAmount":{"type":"object","description":"Price per unit of the item.","properties":{"amount":{"type":"number","format":"float","description":"Price for a single unit."},"currency":{"type":"string","maxLength":3,"description":"Currency in ISO 4217 3-letter format."}}},"quantity":{"type":"integer","description":"Number of units purchased."},"deliveryDetails":{"type":"object","description":"Delivery details for the item.","properties":{"shippingCarrier":{"type":"string","maxLength":45,"description":"Carrier used for shipping the product."},"trackingNumber":{"type":"string","maxLength":255,"description":"Tracking number provided by the carrier."},"dateOfShipment":{"type":"string","format":"date-time","description":"Date the item was shipped."},"dateOfDelivery":{"type":"string","format":"date-time","description":"Date the item was delivered."},"deliveryStatus":{"type":"string","maxLength":25,"description":"Current status of the delivery."},"otherStatusDescription":{"type":"string","maxLength":25,"description":"Additional description if deliveryStatus is \"OTHER\"."}}}}}}}},"merchantInformation":{"type":"object","required":["merchantName","merchantUrl","merchantContactPhone","storeDetails"],"properties":{"merchantName":{"type":"string","description":"Name of the merchant.","maxLength":100},"merchantUrl":{"type":"string","description":"URL of the merchant.","format":"uri","maxLength":1000},"websiteUrl":{"type":"string","format":"uri","maxLength":1000,"description":"The website where the consumer made the online purchase."},"merchantContactPhone":{"type":"string","description":"Contact phone number in E.164 format (e.g., +12345678901).","pattern":"^\\+[1-9]\\d{10,14}$"},"merchantAddress":{"type":"object","description":"Merchant's business mailing address.","properties":{"address1":{"type":"string","maxLength":50,"description":"Primary address line."},"address2":{"type":"string","maxLength":50,"description":"Additional address line."},"city":{"type":"string","maxLength":50,"description":"City name."},"region":{"type":"string","maxLength":3,"description":"State, province, or region (ISO 3166-2)."},"postalCode":{"type":"string","maxLength":9,"description":"ZIP or postal code."},"country":{"type":"string","maxLength":3,"description":"Country in ISO 3166-1 alpha-3 format."}}},"termsAndConditions":{"type":"string","format":"uri","maxLength":2000,"description":"URL pointing to terms and conditions."},"storeDetails":{"type":"object","required":["storeName"],"properties":{"storeName":{"type":"string","description":"Name of the store.","maxLength":100},"storeContactPhone":{"type":"string","pattern":"^\\+[1-9]\\d{10,14}$","description":"Customer service phone number for the store, in E.164 format."},"storeLocation":{"type":"object","description":"Physical store location (for card-present transactions).","properties":{"geoLocation":{"type":"object","description":"Geographic location of the store.","properties":{"latitude":{"type":"string","maxLength":10,"description":"Latitude in signed decimal degrees (DDD.dddd)."},"longitude":{"type":"string","maxLength":10,"description":"Longitude in signed decimal degrees (DDD.dddd)."}}},"locationAddress":{"type":"object","description":"Address of the store.","properties":{"address1":{"type":"string","maxLength":50,"description":"Primary address line."},"address2":{"type":"string","maxLength":50,"description":"Secondary address line."},"city":{"type":"string","maxLength":50,"description":"City name."},"region":{"type":"string","maxLength":3,"description":"State/province/region."},"postalCode":{"type":"string","maxLength":9,"description":"ZIP or postal code."},"country":{"type":"string","maxLength":3,"description":"Country in ISO 3166-1 alpha-3 format."}}}}}}}}},"customerInformation":{"type":"object","description":"Customer information.","properties":{"accountId":{"type":"string","description":"Customer account identifier. Required for Compelling Evidence(CE).","maxLength":50},"emailAddress":{"type":"string","format":"email","description":"Customer email address."},"firstName":{"type":"string","description":"Customer's first name."},"lastName":{"type":"string","description":"Customer's last name."},"lengthOfRelationship":{"type":"string","description":"Length of relationship with the Merchant in number of months."}}},"deliveryAddress":{"type":"object","description":"Delivery Address. Required for Compelling Evidence(CE).","properties":{"address1":{"type":"string","description":"Primary address line. Required for Compelling Evidence(CE).","maxLength":50},"address2":{"type":"string","maxLength":50,"description":"Secondary address line."},"city":{"type":"string","maxLength":50,"description":"City name. Required for Compelling Evidence(CE)."},"region":{"type":"string","maxLength":3,"description":"State/province/region. Required for Compelling Evidence(CE)."},"postalCode":{"type":"string","maxLength":9,"description":"ZIP or postal code. Required for Compelling Evidence(CE)."},"country":{"type":"string","maxLength":3,"description":"Country in ISO 3166-1 alpha-3 format. Required for Compelling Evidence(CE)."}}},"recipientCustomerName":{"type":"string","description":"Name of the recipient customer.","maxLength":20},"device":{"type":"object","description":"Device details. Required for Compelling Evidence(CE).","properties":{"deviceId":{"type":"string","description":"Device identifier. Required for Compelling Evidence(CE).","minLength":15,"maxLength":32},"devicename":{"type":"string","description":"Name of the device.","maxLength":50},"deviceType":{"type":"string","description":"Type of device (e.g., mobile, desktop).","maxLength":20},"ipAddress":{"type":"string","format":"ipv4","description":"IP address of the device. Required for Compelling Evidence(CE).","maxLength":45},"deviceFingerprint":{"type":"string","description":"Fingerprint of the device. Required for Compelling Evidence(CE).","maxLength":45},"deviceLocation":{"type":"object","description":"Location of the device.","properties":{"geoLocation":{"type":"object","description":"Geographic location of the device.","properties":{"latitude":{"type":"string","maxLength":10,"description":"Latitude in signed decimal degrees (DDD.dddd)."},"longitude":{"type":"string","maxLength":10,"description":"Longitude in signed decimal degrees (DDD.dddd)."}}}}}}},"flightDetails":{"description":"Information about flight(s) associated with the purchase.","type":"object","properties":{"reservationNumber":{"type":"string","maxLength":50},"reservationDate":{"type":"string","format":"date-time"},"memberRewardsNumber":{"type":"string","maxLength":20},"memberRewardsName":{"type":"string","maxLength":50},"passengerName1":{"type":"string","maxLength":50},"passengerName2":{"type":"string","maxLength":50},"passengerName3":{"type":"string","maxLength":50},"passengerName4":{"type":"string","maxLength":50},"passengerName5":{"type":"string","maxLength":50},"itinerary":{"type":"string","description":"Flight itinerary details.","maxLength":2000},"additionalRelatedPurchases":{"type":"integer"},"flightManifestName":{"type":"string","maxLength":50},"flightManifestDateOfBirth":{"type":"string","format":"date-time"},"travelUtilizationIndicator":{"type":"boolean"},"travelInsurance":{"type":"string","format":"uri","maxLength":2000},"reservationReceivedFrom":{"type":"string","maxLength":50},"termsAndConditions":{"type":"string","format":"uri","maxLength":2000}}},"hotelDetails":{"type":"object","properties":{"reservationNumber":{"type":"string","maxLength":50},"reservationDate":{"type":"string","format":"date-time"},"memberRewardsNumber":{"type":"string","maxLength":20},"memberRewardsNameRegistered":{"type":"string","maxLength":50},"checkInDate":{"type":"string","format":"date-time"},"checkOutDate":{"type":"string","format":"date-time"},"lengthOfStay":{"type":"integer"},"hotelRoomType":{"type":"string","maxLength":20},"travelInsurance":{"type":"string","maxLength":2000},"reservationReceivedFrom":{"type":"string","maxLength":50},"termsAndConditions":{"type":"string","format":"uri","maxLength":2000}}},"carRentalDetails":{"type":"object","properties":{"reservationNumber":{"type":"string","maxLength":50},"reservationDate":{"type":"string","format":"date-time"},"memberRewardsNumber":{"type":"string","maxLength":20},"memberRewardsName":{"type":"string","maxLength":50},"carRentalVehicleDescription":{"type":"string","maxLength":50},"carRentalPickupDate":{"type":"string","format":"date-time"},"carRentalPickupLocation":{"type":"object","properties":{"geoLocation":{"type":"object","properties":{"latitude":{"type":"string","maxLength":10},"longitude":{"type":"string","maxLength":10}}},"locationAddress":{"type":"object","properties":{"address1":{"type":"string","maxLength":50},"address2":{"type":"string","maxLength":50},"city":{"type":"string","maxLength":50},"region":{"type":"string","maxLength":3},"postalCode":{"type":"string","maxLength":9},"country":{"type":"string","maxLength":3}}}}},"carRentalDropOffDate":{"type":"string","format":"date-time"},"carRentalDropOffLocation":{"type":"object","properties":{"geoLocation":{"type":"object","properties":{"latitude":{"type":"string","maxLength":10},"longitude":{"type":"string","maxLength":10}}},"locationAddress":{"type":"object","properties":{"address1":{"type":"string","maxLength":50},"address2":{"type":"string","maxLength":50},"city":{"type":"string","maxLength":50},"region":{"type":"string","maxLength":3},"postalCode":{"type":"string","maxLength":9},"country":{"type":"string","maxLength":3}}}}},"travelInsurance":{"type":"string","maxLength":2000},"reservationReceivedFrom":{"type":"string","maxLength":50},"termsAndConditions":{"type":"string","format":"uri","maxLength":2000}}},"rideShareDetails":{"type":"object","properties":{"pickupLocation":{"type":"object","properties":{"geoLocation":{"type":"object","properties":{"latitude":{"type":"string","maxLength":10},"longitude":{"type":"string","maxLength":10}}},"locationAddress":{"type":"object","properties":{"address1":{"type":"string","maxLength":50},"address2":{"type":"string","maxLength":50},"city":{"type":"string","maxLength":50},"region":{"type":"string","maxLength":3},"postalCode":{"type":"string","maxLength":9},"country":{"type":"string","maxLength":3}}}}},"dropOffLocation":{"type":"object","properties":{"geoLocation":{"type":"object","properties":{"latitude":{"type":"string","maxLength":10},"longitude":{"type":"string","maxLength":10}}},"locationAddress":{"type":"object","properties":{"address1":{"type":"string","maxLength":50},"address2":{"type":"string","maxLength":50},"city":{"type":"string","maxLength":50},"region":{"type":"string","maxLength":3},"postalCode":{"type":"string","maxLength":9},"country":{"type":"string","maxLength":3}}}}},"dateOfTrip":{"type":"string","format":"date-time"},"totalAmount":{"type":"object","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string","maxLength":3}}},"vehicleDescription":{"type":"string","maxLength":50},"termsAndConditions":{"type":"string","format":"uri","maxLength":2000}}}}}}}}},"responses":{"200":{"description":"Response","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"},"txShieldOICartReference":{"type":"string"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"404":{"description":"Merchant 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
