# Upload Transaction Batch

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

This endpoint is used to upload and validate a batch of transactions for a specified merchant. The **Request Body** must include a json array. Each array item should contain a single transaction object.

&#x20;It performs general validation and mandatory field checks on the transaction data. If all validations pass, a success message is returned. Otherwise, detailed error messages are provided for any validation failures.

### **Headers**

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

### Path Parameters

| Name         | Description                              |
| ------------ | ---------------------------------------- |
| `merchantId` | Merchant Id for transaction batch upload |

### **Body**

<table data-full-width="true"><thead><tr><th>Name</th><th>Type</th><th width="227">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>transactionDate</code></td><td>Datetime (ISO 8601 format)</td><td>True</td><td>Date and time when the order was placed.</td></tr><tr><td><code>paymentDescriptor</code></td><td>String</td><td>True</td><td>Payment descriptor as it appears on the customer's statement.</td></tr><tr><td><code>cardBin</code></td><td>String</td><td>True</td><td>First six digits of the credit card used for the transaction.</td></tr><tr><td><code>cardLast4</code></td><td>String</td><td>True</td><td>Last four digits of the credit card used for the transaction.</td></tr><tr><td><code>receipt</code></td><td>Object</td><td>True</td><td>Contains detailed information about the receipt</td></tr><tr><td><code>receipt.paymentInformation</code></td><td>Object</td><td>True</td><td>Contains detailed information about the payment information</td></tr><tr><td><code>receipt.paymentInformation.paymentTotalAmount</code></td><td>Object</td><td>True</td><td>Contains detailed information about the payment total amount</td></tr><tr><td><code>receipt.paymentInformation.paymentTotalAmount.amount</code></td><td>Number</td><td>True</td><td>The payment amount</td></tr><tr><td><code>receipt.paymentInformation.paymentTotalAmount.currency</code></td><td>String</td><td>True</td><td>The payment currency</td></tr><tr><td><code>merchantInformation</code></td><td>Object</td><td>True</td><td>Contains detailed information about the merchant information</td></tr><tr><td><code>merchantInformation.merchantName</code></td><td>String</td><td>True</td><td>The merchant name</td></tr><tr><td><code>merchantInformation.merchantUrl</code></td><td>String</td><td>True</td><td>The merchant url</td></tr><tr><td><code>merchantInformation.merchantContactPhone</code></td><td>String</td><td>True</td><td>The merchant contact phone</td></tr><tr><td><code>merchantInformation.storeDetails.storeName</code></td><td>String</td><td>True</td><td>The store name</td></tr><tr><td><code>deliveryAddress</code></td><td>Object</td><td>True</td><td>Contains detailed information about the delivery address</td></tr><tr><td><code>deliveryAddress.address1</code></td><td>String</td><td>True</td><td>The delivery address</td></tr><tr><td><code>deliveryAddress.city</code></td><td>String</td><td>True</td><td>The delivery city</td></tr><tr><td><code>deliveryAddress.region</code></td><td>String</td><td>True</td><td>The delivery region</td></tr><tr><td><code>deliveryAddress.postalCode</code></td><td>String</td><td>True</td><td>The delivery postal code</td></tr><tr><td><code>deliveryAddress.country</code></td><td>String</td><td>True</td><td>The delivery country</td></tr><tr><td><code>device</code></td><td>Object</td><td>True</td><td>Contains detailed information about the device</td></tr><tr><td><code>device.deviceId</code></td><td>String</td><td>True</td><td>The device id</td></tr><tr><td><code>device.ipAddress</code></td><td>String</td><td>True</td><td>The device ip address</td></tr><tr><td><code>device.deviceFingerprint</code></td><td>String</td><td>True (Conditionally)</td><td>The device fingerprint</td></tr></tbody></table>

## Upload Transaction Batch

> Upload a batch of merchant transactions as JSON.

```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}/uploadTransactionBatch":{"post":{"tags":["Merchant"],"summary":"Upload Transaction Batch","description":"Upload a batch of merchant transactions as JSON.","operationId":"merchantUploadTransactionBatch","parameters":[{"name":"merchantId","in":"path","description":"Merchant Id for transaction batch upload","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","minItems":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":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["success","error"]},"txShieldOICartReference":{"type":"string"},"msg":{"type":"string"}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"401":{"description":"Unauthorized","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":"Internal 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/upload-transaction-batch.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.
