---
updatedAt: 2026-04-20T21:28:01.000Z
agentTools:
  projectIndex: https://docs.atlar.com/llms.txt
---

# Create direct debit batch

Create a batch of direct debit payments.

See https://docs.atlar.com/docs/batch-payments for more information.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Atlar API (v2)",
    "description": "Atlar API (v2)",
    "version": "0.1",
    "contact": {
      "email": "support@atlar.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.txt"
    }
  },
  "servers": [
    {
      "url": "https://api.atlar.com"
    }
  ],
  "tags": [
    {
      "name": "Direct Debits",
      "description": "Direct debits are payments initiated by a creditor to collect funds from a debtor's account.",
      "x-displayName": "Direct Debits"
    },
    {
      "name": "Events (webhooks)",
      "description": "Webhooks are automated notifications sent to a specified URL in response to events or changes.",
      "x-displayName": "Events (webhooks)"
    }
  ],
  "paths": {
    "/payments/v2beta/direct-debit-batches": {
      "post": {
        "summary": "Create direct debit batch",
        "description": "Create a batch of direct debit payments.\n\nSee https://docs.atlar.com/docs/batch-payments for more information.",
        "tags": [
          "Direct Debits"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDirectDebitBatchRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreateDirectDebitBatchRequestFormData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created direct debit batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentBatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "security": [
          {
            "basicAuth": [
              "direct_debits:create",
              "accounts:read",
              "entities:read",
              "external_accounts:read",
              "counterparties:read"
            ]
          }
        ]
      }
    }
  },
  "webhooks": {
    "resourceEvent": {
      "post": {
        "summary": "Resource event",
        "description": "Resource event delivered as a webhook request.",
        "security": [],
        "tags": [
          "Events (webhooks)"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Webhook-Signature",
            "description": "Atlar Webhook request signature.\nPurpose: Makes it possible for your app to verify that the webhook was sent from Atlar (authenticity), and that the message hasn't been altered (integrity).\nSee details at https://docs.atlar.com/v2.0/docs/webhooks#webhook-security",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Webhook-Request-Timestamp",
            "description": "A timestamp specifying when the HTTP request was sent (by Atlar).\nPurpose: Used to mitigate replay attacks.\nSee details at https://docs.atlar.com/v2.0/docs/webhooks#webhook-security",
            "schema": {
              "type": "string",
              "format": "date-time",
              "example": "2022-10-11T10:13:14.000000015Z"
            }
          }
        ],
        "requestBody": {
          "description": "Resource event webhook payload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventWebhookPayload"
              },
              "examples": {
                "WebhookRequestPayload_ResourceEvent_CreditTransfer_Approval": {
                  "$ref": "#/components/examples/WebhookRequestPayload_ResourceEvent_CreditTransfer_Approval"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 OK status to indicate that the data was received and processed successfully."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "CreatedTimestamp": {
        "type": "string",
        "format": "date-time",
        "description": "Time at which the resource was created.",
        "example": "2022-05-04T18:31:12.889104898Z",
        "readOnly": true
      },
      "UpdatedTimestamp": {
        "type": "string",
        "format": "date-time",
        "description": "Time at which the resource was last updated.",
        "example": "2022-05-04T18:47:32.213842599Z",
        "readOnly": true
      },
      "ResourceID": {
        "type": "string",
        "description": "Unique resource identifier.",
        "minLength": 32,
        "maxLength": 64,
        "examples": [
          "2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8"
        ]
      },
      "ResourceVersion": {
        "type": "integer",
        "description": "Resource version. Starts at value `1` when the resource is\ncreated and increases by one for each successive update.",
        "example": 1,
        "minimum": 1,
        "readOnly": true
      },
      "ETag": {
        "type": "string",
        "description": "[ETag](https://en.wikipedia.org/wiki/HTTP_ETag) based on the\nresource version. This can be passed along in `If-Match` HTTP\nheader when updating a resource to perform a conditional\nupdate.",
        "pattern": "^version:\\d{1,4}$",
        "example": "version:3",
        "readOnly": true,
        "externalDocs": {
          "url": "https://en.wikipedia.org/wiki/HTTP_ETag"
        }
      },
      "OrganizationID": {
        "type": "string",
        "description": "Unique resource identifier for an Organization.",
        "examples": [
          "0160f6ab-5741-49e1-af46-9138927e547e"
        ]
      },
      "Event": {
        "type": "object",
        "description": "A resource event.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the event.",
            "example": 1
          },
          "organizationId": {
            "$ref": "#/components/schemas/OrganizationID"
          },
          "entityId": {
            "description": "The ID of the API resource that this event belongs to.",
            "$ref": "#/components/schemas/ResourceID"
          },
          "type": {
            "$ref": "#/components/schemas/EventType"
          },
          "name": {
            "type": "string",
            "description": "The event name. Different resources have different sets of event names.",
            "example": "CREATED"
          },
          "timestamp": {
            "description": "When the event happened.",
            "type": "string",
            "format": "date-time",
            "example": "2022-08-20T12:20:40.866061374Z"
          },
          "details": {
            "description": "Additional details describing this event.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "examples": [
              {
                "approvalStepId": "e741c062-19f6-46a0-be31-63dded5b0341"
              }
            ]
          },
          "message": {
            "type": "string",
            "description": "A message which could either be a message from the bank or an explanation of the event."
          },
          "originator": {
            "description": "The originator of the event which could be either a user ID, BANK or ATLAR.",
            "type": "string",
            "example": "ATLAR"
          }
        },
        "required": [
          "id",
          "organizationId",
          "entityId",
          "type",
          "name",
          "originator",
          "timestamp"
        ]
      },
      "CurrencyCode": {
        "type": "string",
        "description": "Three-letter ISO 4217 currency code.",
        "example": "EUR",
        "minLength": 3,
        "maxLength": 3,
        "pattern": "^[A-Z]{3,3}$"
      },
      "ExternalID": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9._\\-+=]{1,64}$",
        "description": "External ID is optional to use, but if used, the Atlar platform will persist it, index it, as well as require it to be unique across all resources. It is possible to retrieve a resource using the external ID using the prefix `external:`.",
        "example": "walVNuin6X5Mvte4xhg1ibTAVSACfN4Q9hl",
        "x-omitempty": true
      },
      "AmountInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AmountIntegerValueInput"
          },
          {
            "$ref": "#/components/schemas/AmountStringValueInput"
          }
        ]
      },
      "Amount": {
        "type": "object",
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode"
          },
          "stringValue": {
            "description": "A string representation of the amount value. This will be\na decimal number if the currency has decimals. The number\nis not formatted for display purposes (e.g. with locale\nspecific thousand separator) and always contains the dot\n`.` character as decimal separator.",
            "example": "15.02",
            "type": "string"
          },
          "value": {
            "description": "The amount value as an integer (int64) represented in\ncurrency minor units (e.g. 15.02 EUR is represented as the\nvalue 1502).",
            "example": 1502,
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "currency",
          "stringValue",
          "value"
        ]
      },
      "Date": {
        "type": "string",
        "format": "date",
        "description": "`full-date` notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), for example, `2017-07-21`.",
        "example": "2022-05-07"
      },
      "Metadata": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": {
          "type": "string"
        },
        "description": "Metadata is a `string-string` key-value container that\ncan be used to store information known at the time of resource\ncreation. This can be retrieved later on, for instance when a\npayment or expected transaction is reconciled with the booked\ntransaction on the bank statement.\n\nMetadata can have at most 20 entries. Keys may have a\nmaximum length of 64 chars and values a maximum length of 512\nchars.\n\nBy default, this field is optional. It is possible to make it\nrequired in the Atlar Dashboard by visiting the [Metadata keys\npage](https://app.atlar.com/metadata-keys). Requirement rules\ncan be specified per API resource. Both the Dashboard and the\nAPI will then enforce these rules and give validation errors\nwhen the required fields are not set.",
        "maxProperties": 20,
        "example": {
          "my_metadata_key": "2a9a79b9-601c-449b-aa05-432f41dbbc4a"
        },
        "x-omitempty": true
      },
      "AmountIntegerValueInput": {
        "type": "object",
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode"
          },
          "value": {
            "description": "The amount value as an integer (int64) represented in currency minor units (e.g. 15.02 EUR is represented as the value 1502).",
            "example": 1502,
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "currency",
          "value"
        ]
      },
      "AmountStringValueInput": {
        "type": "object",
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode"
          },
          "stringValue": {
            "description": "A string representation of the amount value, which will be a decimal number if the currency has decimals. The number is not formatted for display purposes (e.g. with thousand separator) and always contains the dot `.` character as decimal separator.",
            "example": "15.02",
            "type": "string"
          }
        },
        "required": [
          "currency",
          "stringValue"
        ]
      },
      "ErrorDetails": {
        "type": "object",
        "description": "Error detail.",
        "properties": {
          "code": {
            "description": "An error code for this error. Not always present.",
            "example": "invalid_value",
            "type": "string"
          },
          "error": {
            "description": "A description of this specific error.",
            "example": "Must be one of [direct_debits mandates payments]",
            "type": "string"
          },
          "field": {
            "description": "The field which has an error. This only set if the error has to do with a specific field, such as for validation errors. Nested fields are concatenated with `.`, as well as indexed fields in lists.",
            "example": "filter.0.resource",
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Error response.",
        "properties": {
          "status": {
            "description": "The HTTP status code.",
            "example": 400,
            "type": "integer",
            "readOnly": true
          },
          "message": {
            "description": "A top-level message describing the error(s).",
            "example": "There is some problem with the data you submitted.",
            "type": "string",
            "readOnly": true
          },
          "details": {
            "description": "A list of details for each error that occurred.",
            "items": {
              "$ref": "#/components/schemas/ErrorDetails"
            },
            "type": "array",
            "readOnly": true,
            "x-omitempty": true
          }
        }
      },
      "EventType": {
        "type": "string",
        "description": "Event type.",
        "enum": [
          "CREATED",
          "UPDATED",
          "DELETED"
        ]
      },
      "ChargeBearer": {
        "type": "string",
        "description": "Charge bearer specifies which party should bear the charges of the transaction.",
        "enum": [
          "SHARED",
          "DEBTOR",
          "CREDITOR",
          "SERVICE_LEVEL"
        ],
        "example": "SHARED"
      },
      "BatchAmountSums": {
        "type": "array",
        "description": "The total amount sum per each currency of resources in this batch.\n\nNote that batch amount sums reported on the batch input metadata\nrefer to the total amount sums of the input records (resources)\nwhile the batch amount sums reported on the batch result refer\nto the total amount sums of the successfully processed records (resources).\nThis means that there may be a difference in the total sum for the input\nvs the result, due to skipped records (resources).\n",
        "items": {
          "$ref": "#/components/schemas/Amount"
        },
        "readOnly": true
      },
      "BatchInputContent": {
        "description": "Metadata describing the input contents that was used to create this batch.",
        "type": "object",
        "readOnly": true,
        "properties": {
          "contentType": {
            "type": "string"
          },
          "recordCount": {
            "type": "integer",
            "description": "Total count of input records (resources) in the input batch.",
            "readOnly": true
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "description": "The size of the input content in bytes.\n\nIf the batch was created by uploading a file using `multipart/form-data` the `contentSize` will be the file size.\n\nIf the batch was created with JSON input this will be the raw JSON size.\n",
            "example": 4711
          },
          "checksum": {
            "type": "string",
            "description": "A checksum of the batch input contents.\n\nThe checksum digest value will be prefixed by an\nidentifier of the hash algorithm used, e.g. `sha256`. A\ncolon `:` is used as separator between the algorithm\nidentifier and the digest value.\n",
            "example": "sha256:08343d976a896e8563b4915c84878207199b5fa139d3edde1bd77d99339bd18c"
          },
          "filename": {
            "type": "string",
            "description": "The name of the file that was used as input to create the batch.\n\nFilename will only available if the batch input was provided using `multipart/form-data`.\n",
            "example": "batch-2022-05-07.csv"
          }
        },
        "required": [
          "recordCount",
          "contentType",
          "size",
          "checksum"
        ]
      },
      "BatchErrors": {
        "description": "A list of error details if the batch failed. Only populated once the batch has reached status `COMPLETED`. Only the first 255 errors (if any) will be present in this list. If there are more errors, the complete list can be retrieved using the results endpoint for the batch.",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ErrorDetails"
        },
        "maxItems": 255
      },
      "BatchResultSummary": {
        "description": "Aggregate summary of batch processing results.",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Number of input records that were attempted to be processed."
          },
          "succeeded": {
            "type": "integer",
            "description": "Number of input records that resulted in a successfully created resource."
          },
          "failed": {
            "type": "integer",
            "description": "Number of failed records."
          },
          "skipped": {
            "type": "integer",
            "description": "Number of input records that were skipped."
          }
        },
        "required": [
          "total",
          "succeeded",
          "failed",
          "skipped"
        ]
      },
      "BatchStatus": {
        "type": "string",
        "description": "The status of this batch. The status only refers to the\nprocessing of the input, not the processing or success of\nthe resources themselves.\n\n`COMPLETED` is the only end-state. Failure is indicated by a non-empty list of `errors`.\n",
        "example": "COMPLETED",
        "enum": [
          "CREATED",
          "PROCESSING_STARTED",
          "COMPLETED"
        ]
      },
      "DirectDebitSchemeType": {
        "type": "string",
        "description": "Direct debit payment scheme. Choose among: <ul>\n  <li><code>SDD_CORE</code> (<a\nhref=\"https://www.europeanpaymentscouncil.eu/what-we-do/epc-payment-schemes/sepa-direct-debit/sepa-direct-debit-core-rulebook-and-implementation\">SEPA Direct Debit Core</a>)</li>\n  <li><code>SDD_B2B</code> (<a\nhref=\"https://www.europeanpaymentscouncil.eu/what-we-do/epc-payment-schemes/sepa-direct-debit/sepa-direct-debit-b2b-rulebook-and-implementation\">SEPA Direct Debit B2B</a>)</li>\n  <li><code>GB_DD_BACS</code> (UK <a href=\"https://www.bacs.co.uk\">BACS</a> Direct Debit)</li>\n  <li><code>AUTOGIRO</code> (Swedish <a href=\"https://www.bankgirot.se/autogiro\">Bg AutoGiro</a>)</li>\n  <li><code>CH_DD_LSV</code> (Swiss <a href=\"https://www.six-group.com/en/products-services/banking-services/billing-and-payments/direct-debits.html\">Direct Debit LSV+</a>)</li>\n  <li><code>CH_DD_BDD</code> (Swiss <a href=\"https://www.six-group.com/en/products-services/banking-services/billing-and-payments/direct-debits.html\">Direct Debit BDD</a>)</li>\n  <li><code>US_DD_ACH</code> (US ACH Direct Debit)</li>\n</ul>",
        "enum": [
          "SDD_CORE",
          "SDD_B2B",
          "GB_DD_BACS",
          "AUTOGIRO",
          "CH_DD_LSV",
          "CH_DD_BDD",
          "US_DD_ACH"
        ],
        "example": "SDD_CORE"
      },
      "SchemeDetailsUrgency": {
        "type": "string",
        "description": "The urgency of the payment.",
        "enum": [
          "HIGH"
        ]
      },
      "AccountType": {
        "type": "string",
        "enum": [
          "ACCOUNT",
          "EXTERNAL_ACCOUNT",
          "INLINE"
        ],
        "description": "Account type specifier. `ACCOUNT` for internal _Account_ resources. `EXTERNAL_ACCOUNT` for _External Account_ resources."
      },
      "InstrumentType": {
        "type": "string",
        "description": "The type of the payment instrument.",
        "enum": [
          "US_ACH",
          "CITI_WORLDLINK"
        ],
        "example": "CITI_WORLDLINK"
      },
      "CategoryPurpose": {
        "type": "string",
        "description": "ISO 20022 Category Purpose Code (ExternalCategoryPurpose1Code).",
        "example": "SALA"
      },
      "ExternalAccountRef": {
        "type": "object",
        "description": "A reference to an External Account.",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AccountType"
          },
          "id": {
            "type": "string",
            "description": "ID or External ID of an External Account. Prefix External IDs with `external:`."
          }
        },
        "required": [
          "type",
          "id"
        ],
        "example": {
          "type": "EXTERNAL_ACCOUNT",
          "id": "86faeacd-05f0-4836-a86c-51b871e10299"
        }
      },
      "InternalAccountRef": {
        "type": "object",
        "description": "A reference to an (internal) Account.",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AccountType"
          },
          "id": {
            "type": "string",
            "description": "ID of an (internal) Account."
          }
        },
        "required": [
          "type",
          "id"
        ],
        "examples": [
          {
            "type": "ACCOUNT",
            "id": "31d593d7-fff9-4783-aa1d-92acb7b21a19"
          }
        ]
      },
      "PaymentReference": {
        "type": "string",
        "description": "This reference will be sent to the destination bank and recipient. (This type of reference is sometimes also referred to as remittance information.)",
        "maxLength": 140
      },
      "BatchTreatmentType": {
        "type": "string",
        "deprecated": true,
        "description": "Deprecated: You can approve or reject on batch and individual level regardless of the treatment type.\n",
        "enum": [
          "INDIVIDUAL_PAYMENTS",
          "BATCH"
        ],
        "example": "INDIVIDUAL_PAYMENTS"
      },
      "BatchResultsSummary": {
        "description": "Aggregate summary of payment batch processing results.",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Deprecated. Moved to `processed`. Number of input records that were attempted to be processed."
          },
          "succeeded": {
            "type": "integer",
            "description": "Deprecated. Moved to `processed`. Number of input records that resulted in a successfully created payment."
          },
          "failed": {
            "type": "integer",
            "description": "Deprecated. Moved to `processed`. Number of failed records."
          },
          "skipped": {
            "type": "integer",
            "description": "Deprecated. Moved to `processed`. Number of input records that were skipped."
          },
          "processed": {
            "$ref": "#/components/schemas/BatchResultSummary"
          },
          "sums": {
            "$ref": "#/components/schemas/BatchAmountSums"
          }
        },
        "required": [
          "total",
          "succeeded",
          "failed",
          "skipped",
          "processed",
          "sums"
        ]
      },
      "PaymentApprovalStep": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The ID of this step. Used when approving/rejecting.",
            "example": "735c7b8c-ef29-456a-8caf-113be117d131",
            "type": "string",
            "readOnly": true
          },
          "approvalChainId": {
            "description": "The ID of the approval chain that triggered this approval step.",
            "type": "string",
            "readOnly": true
          },
          "requiredRoleIds": {
            "type": "array",
            "description": "IDs of the Roles that can approve/reject. Not specified if the step was automatically approved based on an auto-approval chain.",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "uniqueItems": true,
            "readOnly": true,
            "x-omitempty": true
          },
          "status": {
            "description": "The status of the approval step. `PENDING` if step is not yet interacted with.",
            "$ref": "#/components/schemas/ApprovalStatus",
            "readOnly": true
          },
          "approver": {
            "description": "User information about the user who approved/rejected. Omitted if step is not yet approved/rejected.",
            "$ref": "#/components/schemas/UserAuditInfo",
            "readOnly": true
          },
          "updated": {
            "description": "Timestamp when approved/rejected. Omitted if the step is not yet approved/rejected.",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "autoApproved": {
            "type": "boolean"
          },
          "allowCreatorApproval": {
            "description": "Allow approval by the user creating this resource if they have the role required for this step. By default, this is not allowed to conform with a four-eyes principle where approval by another person is required.",
            "type": "boolean",
            "readOnly": true
          },
          "sequentialApproval": {
            "type": "boolean",
            "description": "If true, the approval steps for this approval chain, specified by `approvalChainId`, need to be approved in the the order specified by `sequenceNumber`.",
            "readOnly": true
          },
          "sequenceNumber": {
            "type": "integer",
            "description": "The sequence number of this step in the approval chain.",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "status",
          "approvalChainId",
          "autoApproved"
        ]
      },
      "ApprovalStatus": {
        "type": "string",
        "description": "The status of the approval step.",
        "enum": [
          "PENDING",
          "APPROVED",
          "REJECTED"
        ],
        "examples": [
          "APPROVED"
        ]
      },
      "UserAuditInfo": {
        "type": "object",
        "description": "User information for audit trail.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ResourceID",
            "description": "User ID",
            "example": "54528335-739e-4de9-bdb3-28f96c98785d"
          },
          "username": {
            "type": "string",
            "example": "john.smith@example.com",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "User given name(s) information. May be a concatenation of firstname, lastname etc.",
            "example": "John Smith",
            "readOnly": true
          },
          "roleId": {
            "type": "string",
            "description": "Role ID",
            "example": "2a1e16eb-2f83-4597-99e2-cffbc4311df2",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "username"
        ]
      },
      "PaymentBatch": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID of the batch.",
            "$ref": "#/components/schemas/ResourceID",
            "example": "e284485b-e41b-4237-a115-5a02507eacec"
          },
          "organizationId": {
            "$ref": "#/components/schemas/OrganizationID"
          },
          "treatment": {
            "$ref": "#/components/schemas/BatchTreatmentType"
          },
          "input": {
            "description": "Deprecated - use `inputDetails` and `inputContent`.",
            "$ref": "#/components/schemas/BatchInputMetadata",
            "x-atlar-fields-enum-skip": true
          },
          "inputContent": {
            "$ref": "#/components/schemas/BatchInputContent"
          },
          "inputDetails": {
            "description": "Summary of the batch input: amount totals per currency (`sums`) and optional date\nrange across requested execution dates.",
            "$ref": "#/components/schemas/PaymentBatchDetails"
          },
          "results": {
            "description": "Deprecated - use `resultSummary` and `resultDetails`. Summary of processing results.\n\nThe summary is only populated when the batch `status` is `COMPLETED`.\n\nDetailed processing results can be retrieved using\nhttps://docs.atlar.com/v2.0/reference/get_payments-v2beta-credit-transfer-batches-id-results.\n",
            "$ref": "#/components/schemas/BatchResultsSummary",
            "readOnly": true,
            "x-atlar-fields-enum-skip": true
          },
          "resultSummary": {
            "description": "Counts of how input records were processed (total / succeeded / failed / skipped).\nOnly populated when the batch `status` is `COMPLETED`.",
            "$ref": "#/components/schemas/BatchResultSummary"
          },
          "resultDetails": {
            "description": "Amount totals per currency for successfully processed payments in the batch.\nOnly populated when the batch `status` is `COMPLETED`. May differ from\n`inputDetails.sums` when records were skipped.",
            "$ref": "#/components/schemas/PaymentBatchDetails"
          },
          "status": {
            "$ref": "#/components/schemas/BatchStatus",
            "readOnly": true
          },
          "errors": {
            "$ref": "#/components/schemas/BatchErrors"
          },
          "approvalSteps": {
            "deprecated": true,
            "x-deprecated-reason": "Batch-level approval steps are no longer populated. Use the approval steps on each payment. This field will be removed in the future.",
            "description": "Batch approval steps, including who approved or rejected (`approver`), step\n`status`, and `requiredRoleIds`.\n\nApproval steps will only be available once the batch\n`status` is `COMPLETED`. I.e. no action must be taken\nbased on the absence of approval steps (empty array).\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentApprovalStep"
            },
            "readOnly": true
          },
          "externalId": {
            "$ref": "#/components/schemas/ExternalID"
          },
          "approvalResults": {
            "description": "Counts of fully approved vs rejected payments in this batch.",
            "$ref": "#/components/schemas/ApprovalResults"
          },
          "creatorUserId": {
            "$ref": "#/components/schemas/ResourceID",
            "description": "ID of the user that created the batch.",
            "readOnly": true
          },
          "sourceAccountIds": {
            "type": "array",
            "description": "IDs of the accounts that the payments in this batch are initiated from.",
            "items": {
              "$ref": "#/components/schemas/ResourceID"
            },
            "uniqueItems": true,
            "readOnly": true,
            "x-omitempty": true
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "etag": {
            "$ref": "#/components/schemas/ETag"
          },
          "version": {
            "$ref": "#/components/schemas/ResourceVersion"
          },
          "created": {
            "$ref": "#/components/schemas/CreatedTimestamp"
          },
          "updated": {
            "$ref": "#/components/schemas/UpdatedTimestamp"
          }
        },
        "required": [
          "treatment",
          "id",
          "organizationId",
          "etag",
          "status",
          "version",
          "created",
          "updated",
          "input",
          "inputContent",
          "inputDetails",
          "approvalSteps",
          "approvalResults"
        ]
      },
      "ApprovalResults": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "integer",
            "description": "Number of fully approved credit transfers."
          },
          "rejected": {
            "type": "integer",
            "description": "Number of rejected credit transfers."
          }
        },
        "required": [
          "approved",
          "rejected"
        ]
      },
      "DirectDebitTransferBatchContentType": {
        "type": "string",
        "description": "The content type of the batch.\nSee https://docs.atlar.com/docs/batch-payments#csv-format for details on the CSV format for direct debit batches.",
        "enum": [
          "application/vnd.atlar.payments.v2.direct-debit.batch+csv",
          "application/vnd.atlar.payments.v2.direct-debit.batch+json"
        ],
        "example": "application/vnd.atlar.payments.v2.direct-debit.batch+csv"
      },
      "PaymentBatchDetails": {
        "description": "Details summarizing the contents of the batch — primarily amount totals per currency.",
        "type": "object",
        "properties": {
          "sums": {
            "description": "Total amount sum per currency for the payments covered by this details object\n(input records when under `inputDetails`, successfully processed payments when\nunder `resultDetails`).",
            "$ref": "#/components/schemas/BatchAmountSums"
          }
        },
        "required": [
          "sums"
        ]
      },
      "BatchInputMetadata": {
        "description": "Metadata describing the original input that was used to create a payments batch.",
        "type": "object",
        "properties": {
          "recordCount": {
            "type": "integer",
            "description": "Deprecated. Has moved into `content`. Total count of input records (payments) in the input batch.",
            "readOnly": true
          },
          "sums": {
            "$ref": "#/components/schemas/BatchAmountSums"
          },
          "content": {
            "$ref": "#/components/schemas/BatchInputContent"
          }
        },
        "required": [
          "recordCount",
          "sums",
          "content"
        ]
      },
      "CreateDirectDebitBatchRequest": {
        "type": "object",
        "properties": {
          "treatment": {
            "$ref": "#/components/schemas/BatchTreatmentType"
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateDirectDebitRequest"
            },
            "minItems": 1,
            "maxItems": 2000
          },
          "externalId": {
            "$ref": "#/components/schemas/ExternalID"
          },
          "skipValidationErrors": {
            "type": "boolean",
            "description": "Skip/ignore input records that contain validation errors."
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        },
        "required": [
          "treatment",
          "payments"
        ]
      },
      "CreateDirectDebitBatchRequestFormData": {
        "type": "object",
        "properties": {
          "treatment": {
            "$ref": "#/components/schemas/BatchTreatmentType"
          },
          "fileContentType": {
            "$ref": "#/components/schemas/DirectDebitTransferBatchContentType"
          },
          "skipValidationErrors": {
            "type": "boolean",
            "description": "Skip/ignore input records that contain validation errors."
          },
          "file": {
            "type": "string",
            "format": "binary"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        },
        "required": [
          "treatment",
          "fileContentType",
          "file"
        ]
      },
      "CreateDirectDebitRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/AmountInput"
          },
          "scheme": {
            "$ref": "#/components/schemas/DirectDebitSchemeType"
          },
          "schemeDetails": {
            "$ref": "#/components/schemas/SchemeDetailsInput"
          },
          "date": {
            "description": "Requested payment execution date. It is a local date from the source account's point-of-view. Cannot be set to before the current date, and not more than 60 days into the future.",
            "$ref": "#/components/schemas/Date"
          },
          "source": {
            "description": "A reference identifying the source account to collect money from. Can only be an external account.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExternalAccountRef"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "EXTERNAL_ACCOUNT": "#/components/schemas/ExternalAccountRef"
              }
            }
          },
          "destination": {
            "$ref": "#/components/schemas/InternalAccountRef"
          },
          "reference": {
            "$ref": "#/components/schemas/PaymentReference"
          },
          "categoryPurpose": {
            "$ref": "#/components/schemas/CategoryPurpose"
          },
          "chargeBearer": {
            "$ref": "#/components/schemas/ChargeBearer"
          },
          "externalId": {
            "$ref": "#/components/schemas/ExternalID"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "paymentScheduleId": {
            "description": "ID of the payment schedule to associate with this direct debit. Defaults to the organization's default schedule.",
            "$ref": "#/components/schemas/ResourceID"
          }
        },
        "required": [
          "amount",
          "scheme",
          "date",
          "source",
          "destination",
          "reference"
        ]
      },
      "CitiWorldlinkInstrumentInput": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/InstrumentType"
          }
        },
        "required": [
          "type"
        ]
      },
      "InstrumentInput": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CitiWorldlinkInstrumentInput"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "CITI_WORLDLINK": "#/components/schemas/CitiWorldlinkInstrumentInput"
          }
        }
      },
      "SchemeDetailsInput": {
        "type": "object",
        "properties": {
          "instrument": {
            "$ref": "#/components/schemas/InstrumentInput"
          },
          "intraCompany": {
            "type": "boolean",
            "description": "Whether the payment is between companies within the same group."
          },
          "urgency": {
            "$ref": "#/components/schemas/SchemeDetailsUrgency"
          }
        }
      },
      "EventWebhookPayload": {
        "type": "object",
        "description": "A resource event payload when sent as a webhook.",
        "properties": {
          "resource": {
            "description": "Resource name.",
            "type": "string",
            "examples": [
              "credit_transfers",
              "transactions",
              "accounts"
            ]
          },
          "event": {
            "$ref": "#/components/schemas/Event"
          },
          "entity": {
            "description": "A snapshot of the resource entity, after the event / changes impacted the entity.",
            "type": "object"
          },
          "apiVersion": {
            "description": "Atlar API (major) version. This toghether with the `resource` dictates the structure of `entity`.",
            "type": "integer",
            "example": 2
          }
        },
        "required": [
          "resource",
          "event",
          "entity",
          "apiVersion"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "status": 400,
              "message": "There is some problem with the data you submitted."
            }
          }
        }
      }
    },
    "examples": {
      "WebhookRequestPayload_ResourceEvent_CreditTransfer_Approval": {
        "summary": "Credit transfer event",
        "value": {
          "resource": "credit_transfers",
          "event": {
            "id": 3,
            "type": "UPDATED",
            "name": "FULLY_APPROVED",
            "timestamp": "2022-05-04T18:47:32.213842599Z",
            "originator": "ATLAR",
            "message": "Automatically approved",
            "organizationId": "0160f6ab-5741-49e1-af46-9138927e547e",
            "entityId": "ec079994-619c-42e9-ac06-b50d4beea2e4"
          },
          "entity": {
            "id": "76992987-48fc-4b03-b609-ea6fdc3045b4",
            "organizationId": "0160f6ab-5741-49e1-af46-9138927e547e",
            "amount": {
              "currency": "EUR",
              "value": 1502,
              "stringValue": "15.02"
            },
            "date": "2022-05-07",
            "scheme": "SCT",
            "status": "APPROVED",
            "reference": "ref-2022-05-03-001",
            "source": {
              "id": "ac1963d7-fff9-4783-aa1d-92acb7b21a19",
              "type": "ACCOUNT",
              "organizationId": "0160f6ab-5741-49e1-af46-9138927e547e",
              "market": "DE",
              "currency": "EUR",
              "identifiers": [
                {
                  "market": "DE",
                  "type": "IBAN",
                  "number": "DE89370400440532013000"
                }
              ]
            },
            "sourceHolder": {
              "id": "ec079994-619c-42e9-ac06-b50d4beea2e4",
              "type": "ENTITY",
              "legalName": "Example Company GmbH"
            },
            "destinationHolder": {
              "id": "c151b61e-33cc-4f89-ac8d-328f9efa59e9",
              "type": "COUNTERPARTY",
              "legalName": "Max Müller",
              "address": {
                "country": "DE",
                "city": "Berlin",
                "postalCode": "10557"
              }
            },
            "destination": {
              "id": "eac1d236-2904-4b01-8e85-a4ef3a73c353",
              "type": "EXTERNAL_ACCOUNT",
              "organizationId": "0160f6ab-5741-49e1-af46-9138927e547e",
              "market": "DE",
              "identifiers": [
                {
                  "market": "DE",
                  "type": "IBAN",
                  "number": "DE75512108001245126199"
                }
              ],
              "routing": [
                {
                  "type": "BIC",
                  "number": "SOGEDEFFXXX"
                }
              ]
            },
            "approvalSteps": [
              {
                "id": "52699442-e06f-4cda-b2a8-cdeca08ff9d3",
                "approvalChainId": "ac0141ba-c0be-46ed-8542-7313355bab27",
                "status": "APPROVED",
                "autoApproved": false,
                "approver": {
                  "id": "266f4e96-c614-465e-a1a9-1736a7c20bab",
                  "username": "owner@example.com"
                },
                "requiredRoleIds": [
                  "ee4e4acd-9ff0-445f-9cf5-f09350ba15b6"
                ],
                "updated": "2022-05-04T18:47:32.213842599Z"
              }
            ],
            "attachedTransactions": [],
            "version": 3,
            "etag": "version:3",
            "created": "2022-05-04T18:31:12.889104898Z",
            "updated": "2022-05-04T18:47:32.213842599Z"
          },
          "apiVersion": 2
        }
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Atlar Accounting API",
      "tags": [
        "Documents",
        "GL Entities",
        "GL Accounts"
      ]
    },
    {
      "name": "Atlar Analytics API",
      "tags": [
        "Forecasted Transactions"
      ]
    },
    {
      "name": "Atlar Connectivity API",
      "tags": [
        "Connections"
      ]
    },
    {
      "name": "Atlar Payments API",
      "tags": [
        "Credit Transfers",
        "Direct Debits",
        "External Accounts",
        "Counterparties",
        "Mandates",
        "Events (webhooks)",
        "Regulatory Reporting"
      ]
    },
    {
      "name": "Atlar Financial Data API",
      "tags": [
        "Accounts",
        "Transactions",
        "Pending Transactions",
        "Entities",
        "Investments"
      ]
    },
    {
      "name": "Atlar IAM API",
      "tags": [
        "OAuth",
        "Audit logs"
      ]
    },
    {
      "name": "Atlar Platform API",
      "tags": [
        "Webhooks"
      ]
    }
  ]
}
```