---
updatedAt: 2026-08-04T10:39:29.000Z
agentTools:
  projectIndex: https://developer.peachpayments.com/llms.txt
---

# Generate batch link

Returns a URL to which the batch file must be uploaded.

For more information, see the [documentation](https://developer.peachpayments.com/docs/generate-bulk-payment-links), and for sample calls, see the [public Postman collection](https://www.postman.com/peachpayments/peach-payments-public-workspace/request/2pm712c/payment-links-public?action=share&creator=20323380&ctx=documentation&active-environment=13324425-10da86ae-9bc2-4124-8f55-f7255fa3ff55).

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Payment Links",
    "version": "1.0",
    "description": "The Payment Links API enables you to create and send links to a secure payment page hosted by Peach Payments. Send links to customers using email, SMS, WhatsApp, or a combination of the three.",
    "contact": {
      "name": "Peach Payments Support",
      "url": "https://support.peachpayments.com/support/home",
      "email": "support@peachpayments.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://peachpayments.com/legal"
    }
  },
  "servers": [
    {
      "url": "https://sandbox-l.ppay.io",
      "description": "Sandbox testing environment."
    },
    {
      "url": "https://links.peachpayments.com",
      "description": "Live production environment."
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Batch",
      "description": "Endpoints for managing batch payment link operations."
    }
  ],
  "components": {
    "schemas": {
      "MessageResponse": {
        "description": "A generic response containing a human-readable message.",
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "paths": {
    "/api/channels/{entityId}/payments/batches": {
      "parameters": [
        {
          "name": "entityId",
          "in": "path",
          "required": true,
          "description": "The entity for the request.",
          "schema": {
            "type": "string",
            "example": "8ac7a4ca694cec2601694cf5f9360026"
          },
          "style": "simple"
        }
      ],
      "post": {
        "operationId": "generateBatchLinks",
        "summary": "Generate batch link",
        "description": "Returns a URL to which the batch file must be uploaded.\n\nFor more information, see the [documentation](https://developer.peachpayments.com/docs/generate-bulk-payment-links), and for sample calls, see the [public Postman collection](https://www.postman.com/peachpayments/peach-payments-public-workspace/request/2pm712c/payment-links-public?action=share&creator=20323380&ctx=documentation&active-environment=13324425-10da86ae-9bc2-4124-8f55-f7255fa3ff55).",
        "tags": [
          "Batch"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "description": "The name of the CSV to be uploaded.",
                    "maxLength": 256,
                    "example": "test.csv"
                  },
                  "notificationUrl": {
                    "type": "string",
                    "description": "Webhooks are sent to this URL. It overrides the generic merchant webhook URL.",
                    "maxLength": 128,
                    "nullable": true,
                    "example": "https://example.com/example-webhook/"
                  }
                },
                "required": [
                  "filename"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch created with upload URL returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The created batch ID for the upload.",
                      "maxLength": 256,
                      "example": "421e1e63-ddd5-46ec-8812-74eda861259b"
                    },
                    "url": {
                      "type": "string",
                      "description": "The created batch upload URL."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request body failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Request lacks valid authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                },
                "example": {
                  "message": "Request lacks valid authentication."
                }
              }
            }
          },
          "404": {
            "description": "The specified resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                },
                "example": {
                  "message": "Channel not found."
                }
              }
            }
          }
        }
      }
    }
  }
}
```