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

# Get bank details

> Returns the full IBAN and BIC that mint EURe to the Safe, for a caller who proves
to be an owner of the Safe.

- Who may call: an owner of the Safe. One owner signature is enough. The route
  reads `isOwner` on the Safe at the time of the call.
- Before: sign this text with `personal_sign` (EIP-191). Use the checksummed Safe
  address and the chain id of this host. `validUntil` must be in the future and at
  most 600 seconds after now.

  ```text
  Anafi: show the bank account details of 0xF9836De53D455019ED985896FCe8af80be66b7F9 on chain 80002.
  Valid until: 1796305602
  ```
- Guarantee: `iban` and `bic` are `null` until Monerium has issued the IBAN.

Served only on `polygon-amoy`.




## OpenAPI

````yaml /api/openapi.yaml post /api/monerium/bank-details
openapi: 3.1.0
info:
  title: Anafi API
  version: 0.3.0
  summary: The public HTTP API of one Anafi network.
  description: >
    The Anafi API is the HTTP surface of one Anafi network. Each network has its
    own host.

    The public TypeScript SDK `@anafi-cc/anafi-sdk` calls these routes for you,
    and it also

    builds and checks the signed and sealed payloads. You can call the routes
    directly.


    - No API key is necessary today.

    - Request and response bodies are JSON, except where an operation says
    otherwise.

    - A route that carries a confidential payload takes an HPKE-sealed envelope.
    Read
      [Sealed requests](/api-reference/sealed-requests) before you call it without the SDK.
    - Read [Introduction](/api-reference/introduction) for formats and
      [Errors](/api-reference/errors) for the error bodies.

    Browser origin: the API hosts answer CORS only for `https://app.ana.fi`
    today. A browser

    page on another origin cannot call the API directly. A server, a script, or
    your own

    same-origin proxy can call it.
servers:
  - url: https://api.polygon.ana.fi
    description: Polygon PoS (chain id 137)
  - url: https://api.xlayer.ana.fi
    description: X Layer (chain id 196)
  - url: https://api.polygon-amoy.ana.fi
    description: Polygon Amoy testnet (chain id 80002)
security: []
tags:
  - name: Accounts
    description: >-
      Find the accounts of an owner address, and deploy the 1-of-1 Safe of an
      owner.
  - name: Safe relay
    description: Submit an owner-signed Safe transaction. Anafi pays the gas.
  - name: Rules
    description: >-
      Stage a sealed rule document. The engine returns the attestation for the
      on-chain commit.
  - name: Confidential channel
    description: >-
      Read back the rule document and the account state of an account through a
      sealed channel.
  - name: Notification email
    description: Verify the email address that rule notifications go to.
  - name: Activity
    description: Read the payments that the engine made for an account.
  - name: Fees
    description: Read the fee terms of the network and the sponsorship of an account.
  - name: Payments
    description: Ask for the email receipt of a payment made on the pay page.
  - name: Rule language
    description: >-
      Read the rule language reference, and write a rule document from a
      description.
  - name: Bank payouts
    description: >
      Connect a Safe to Monerium for bank payouts in euro, and read the state of
      the

      connection and of the orders. These routes are served only on
      `polygon-amoy`

      (Monerium sandbox). The `polygon` and `xlayer` hosts answer `404`.
  - name: Status
    description: Check that the Anafi API answers.
paths:
  /api/monerium/bank-details:
    post:
      tags:
        - Bank payouts
      summary: Get bank details
      description: >
        Returns the full IBAN and BIC that mint EURe to the Safe, for a caller
        who proves

        to be an owner of the Safe.


        - Who may call: an owner of the Safe. One owner signature is enough. The
        route
          reads `isOwner` on the Safe at the time of the call.
        - Before: sign this text with `personal_sign` (EIP-191). Use the
        checksummed Safe
          address and the chain id of this host. `validUntil` must be in the future and at
          most 600 seconds after now.

          ```text
          Anafi: show the bank account details of 0xF9836De53D455019ED985896FCe8af80be66b7F9 on chain 80002.
          Valid until: 1796305602
          ```
        - Guarantee: `iban` and `bic` are `null` until Monerium has issued the
        IBAN.


        Served only on `polygon-amoy`.
      operationId: getMoneriumBankDetails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoneriumBankDetailsRequest'
            example:
              aaAddress: '0xf9836de53d455019ed985896fce8af80be66b7f9'
              validUntil: 1796305602
              signature: >-
                0x6d0e8b2f4a1c3e5d7f9b0a2c4e6f8d1b3a5c7e9f0d2b4a6c8e1f3d5b7a9c0e2f4b6d8a1c3e5f7b9d0a2c4e6f8b1d3a5c7e9f0b2d4a6c8e1f3d5b7a9c0e2f4d5a1c
      responses:
        '200':
          description: The bank details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoneriumBankDetailsResponse'
              example:
                iban: DE89370400440532013000
                bic: COBADEFFXXX
        '400':
          description: >
            `validUntil` is in the past or more than 600 seconds ahead, or the
            signature is

            unreadable (JSON body). The body is not valid JSON (plain text).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoneriumErrorResponse'
              example:
                error: validUntil must lie in the next 600 seconds
            text/plain:
              schema:
                $ref: '#/components/schemas/PlainTextError'
        '403':
          description: The signer is not an owner of the Safe.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoneriumErrorResponse'
        '404':
          description: No Monerium account is connected to this Safe.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoneriumErrorResponse'
              example:
                error: no Monerium account is connected to this wallet
        '413':
          $ref: '#/components/responses/BodyTooLarge'
        '415':
          $ref: '#/components/responses/MissingJsonContentType'
        '422':
          $ref: '#/components/responses/JsonBodyRejected'
        '500':
          description: The Anafi API could not read its records.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoneriumErrorResponse'
        '503':
          description: >-
            The owners of the Safe could not be read from the chain. Try again
            later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoneriumErrorResponse'
      servers:
        - url: https://api.polygon-amoy.ana.fi
          description: Polygon Amoy testnet (Monerium sandbox)
components:
  schemas:
    MoneriumBankDetailsRequest:
      type: object
      required:
        - aaAddress
        - validUntil
        - signature
      properties:
        aaAddress:
          $ref: '#/components/schemas/Address'
          description: The Safe.
        validUntil:
          $ref: '#/components/schemas/UnixSeconds'
          description: >-
            The time at which the proof expires, as signed. At most 600 seconds
            after now.
        signature:
          $ref: '#/components/schemas/HexBytes'
          description: >-
            The 65-byte `personal_sign` signature of one Safe owner over the
            proof text.
    MoneriumBankDetailsResponse:
      type: object
      required:
        - iban
        - bic
      properties:
        iban:
          type:
            - string
            - 'null'
          description: >-
            The IBAN that mints EURe to the Safe. `null` until Monerium issues
            it.
        bic:
          type:
            - string
            - 'null'
          description: The BIC of the IBAN. `null` until Monerium issues it.
    MoneriumErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: A sentence that says why the route refused.
    PlainTextError:
      type: string
      description: >-
        A short English sentence. Show it or log it. Do not parse it; branch on
        the status code.
    Address:
      type: string
      pattern: ^0x[0-9a-fA-F]{40}$
      description: >-
        A 20-byte address as `0x` and 40 hex digits. Requests accept any letter
        case. Responses use lowercase.
      examples:
        - '0xf9836de53d455019ed985896fce8af80be66b7f9'
    UnixSeconds:
      type: integer
      description: Seconds since 1970-01-01T00:00:00Z.
      examples:
        - 1796305002
    HexBytes:
      type: string
      pattern: ^0x([0-9a-fA-F]{2})*$
      description: Bytes as `0x` and an even count of hex digits.
  responses:
    BodyTooLarge:
      description: >-
        The body is larger than the limit of the route. The limit is 2 MB for
        `POST /api/dsl/generate` and the bank payout routes, and 512 KiB for all
        other routes.
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/PlainTextError'
    MissingJsonContentType:
      description: 'The request has no `Content-Type: application/json` header.'
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/PlainTextError'
          example: 'Expected request with `Content-Type: application/json`'
    JsonBodyRejected:
      description: >-
        The body is valid JSON, but a field is missing or has the wrong type or
        format.
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/PlainTextError'
          example: >-
            Failed to deserialize the JSON body into the target type: missing
            field `eoa` at line 1 column 2

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.