> ## Documentation Index
> Fetch the complete documentation index at: https://docs.propaga.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Create multiple transactions by batch

> Creates multiple transactions

When you call this endpoint, we internally perform several validations, including checking the transaction amount, the customer's status, and their available credit.

<RequestExample>
  ```bash Request theme={null}
  curl --location --request POST 'https://staging-api.propaga.io/v1/transaction/batch'
  --header 'Authorization: <your_awesome_token>' 
  --header 'Content-Type: application/json'
  --data '{
      "transactions": [
          {
              "cornerStoreId": "57b9d911-1c6e-45c0-be98-bfaeec8d9cf8",
              "movementDate": "2024-12-31T00:00:00Z",
              "totalAmount": 1234,
              "wholesalerTransactionId": "123413123123",
              "deliveryDate": "2024-12-31",
              "products": [
                  {
                      "externalSKU": "7501018310103",
                      "name": "Pasta Spaghetti La Moderna - Moderna - Paquete 200 g",
                      "quantity": 5
                  }
              ],
              "metadata": {}
          }
      ],
      "driverId": "12345"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  [
      {
          "incrementalID": 999,
          "transactionId": "13e8b9f0-b73f-4498-a245-05aaae7893dc",
          "totalAmount": 1234,
          "totalAmountWithInterests": 1234,
          "status": "accepted",
          "cornerStoreId": "57b9d911-1c6e-45c0-be98-bfaeec8d9cf8"
      },
      {
          "status": "rejected",
          "rejectionReasons": [
              "INSUFFICIENT_CREDIT"
          ],
          "wholesalerTransactionId": "123413123123",
          "cornerStoreId": "57b9d911-1c6e-45c0-be98-bfaeec8d9cf8"
      }
  ]
  ```
</ResponseExample>

## Body

<ParamField body="transactions" type="array" required>
  <ParamField body="cornerStoreId" type="string" required>
    Propaga's corner store id
  </ParamField>

  <ParamField body="totalAmount" type="number" required>
    Total amount of the order
  </ParamField>

  <ParamField body="wholesalerTransactionId" type="string">
    Your internal ID for this order
  </ParamField>

  <ParamField body="movementDate" type="string">
    Date of the transaction
  </ParamField>

  <ParamField body="deliveryDate" type="string">
    An estimated delivery date
  </ParamField>

  <ParamField body="products" type="array" required>
    <Expandable title="properties">
      <ParamField body="externalSKU" type="string" />

      <ParamField body="name" type="string" />

      <ParamField body="quantity" type="number" />
    </Expandable>
  </ParamField>

  <ParamField body="metadata" type="object" required>
    Any metadata you want to save for the transaction
  </ParamField>
</ParamField>

<ParamField body="driverId" type="string" required>
  Driver id
</ParamField>

## Response

<ResponseField name="incrementalID" type="number">
  Propaga's incremental numeric id
</ResponseField>

<ResponseField name="transactionId" type="string">
  Propaga's transaction id
</ResponseField>

<ResponseField name="totalAmount" type="number">
  Total amount of the order
</ResponseField>

<ResponseField name="totalAmountWithInterests" type="number">
  Total amount of the order with interests
</ResponseField>

<ResponseField name="status" type="string">
  Transaction status batch (accepted, rejected)
</ResponseField>

<ResponseField name="cornerStoreId" type="string">
  Propaga's corner store id
</ResponseField>

<ResponseField name="rejectionReasons" type="string[]">
  Reasons for rejection
</ResponseField>
