# `BankingCircle.ISO20022`
[🔗](https://github.com/iamkanishka/banking_circle/blob/main/lib/banking_circle/iso20022.ex#L1)

Payment initiation via raw ISO20022 XML messages, for shops already
standardized on pain.001 (customer credit transfer initiation) or
pacs.008 (FI-to-FI credit transfer) rather than Banking Circle's JSON
payment shape.

**Scope note:** this module is a thin transport layer — it posts a
caller-supplied XML document to the right endpoint with the right
content type. It does **not** build or validate ISO20022 XML for you;
constructing a correct pain.001/pacs.008 document (namespaces, required
elements, structured-address migration requirements effective November
2026) is real domain complexity better served by a dedicated XML
library (e.g. building via `:xmerl` or a SAXY-based builder) or your
existing ISO20022 tooling than by anything this HTTP client should own.

Prefer `BankingCircle.Payments.create_single/2` (JSON) unless you have a
specific reason to use the XML path.

# `client`

```elixir
@type client() :: atom()
```

# `camt053`

```elixir
@spec camt053(String.t(), keyword(), client()) ::
  {:ok, binary()} | {:error, BankingCircle.Error.t()}
```

Fetches account activity as a camt.053 XML statement, the ISO20022
reporting counterpart to `BankingCircle.Reporting`'s JSON/CSV reports.

# `submit_pacs008`

```elixir
@spec submit_pacs008(binary(), client()) ::
  {:ok, term()} | {:error, BankingCircle.Error.t()}
```

Submits a pacs.008 (`FIToFICustomerCreditTransfer`) XML document — the
ISO20022 path for Correspondent/Agency Banking payments (see also
`BankingCircle.Payments.create_fi_to_fi/2` for the JSON equivalent).
`xml` is the complete, already-valid document body (as a binary).

# `submit_pain001`

```elixir
@spec submit_pain001(binary(), client()) ::
  {:ok, term()} | {:error, BankingCircle.Error.t()}
```

Submits a pain.001 (`CustomerCreditTransferInitiation`) XML document.
`xml` is the complete, already-valid document body (as a binary).

Note: pain.001 initiation is marked deprecated in Banking Circle's
current docs in favor of the JSON payment endpoints — confirm with your
Banking Circle contact whether this path is still recommended for new
integrations before building on it.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
