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

# Mint USDA+

> Creates a mint transaction payload for the bank's wallet. The API does not call the
smart contract or sign the transaction; the bank signs and submits it from their end.
Implies a sufficient balance of reserves and that the corresponding user has sufficient
funds. The caller is responsible for subtracting the reserves from the corresponding account.




## OpenAPI

````yaml openapi.yaml post /v1/tokens/mint
openapi: 3.1.0
info:
  title: A+ API
  version: 1.0.0
  description: >
    Transaction builder API for the A+ token contracts. Banks authenticate via
    API key and request transaction payloads for mint, burn, and transfer. The
    API does not sign, submit,

    or track transactions: the bank signs and submits from their own wallet and
    is responsible

    for transaction lookup, idempotency, and status tracking.
servers:
  - url: http://localhost:3000
    description: Local server
security:
  - BearerAuth: []
paths:
  /v1/tokens/mint:
    post:
      tags:
        - Transaction Operations
      summary: Mint USDA+
      description: >
        Creates a mint transaction payload for the bank's wallet. The API does
        not call the

        smart contract or sign the transaction; the bank signs and submits it
        from their end.

        Implies a sufficient balance of reserves and that the corresponding user
        has sufficient

        funds. The caller is responsible for subtracting the reserves from the
        corresponding account.
      operationId: mintTokens
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - idempotencyKey
                - to
                - amount
                - chain
              properties:
                idempotencyKey:
                  type: string
                  format: uuid
                  description: UUID for idempotency
                  example: 550e8400-e29b-41d4-a716-446655440000
                to:
                  type: string
                  description: Ethereum address to receive the minted tokens
                  example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
                amount:
                  $ref: '#/components/schemas/Money'
                chain:
                  $ref: '#/components/schemas/Chain'
      responses:
        '200':
          description: >-
            Successfully created mint transaction payload; the bank signs and
            submits the transaction from their own wallet.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/TransactionPayload'
              examples:
                response:
                  value:
                    data:
                      to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
                      data: >-
                        0x40c10f19000000000000000000000000742d35cc6634c0532925a3b844bc9e7595f0beb0000000000000000000000000000000000000000000000000000000000989680
                      value: '0x0'
                      chainId: 11155111
                      type: 2
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Money:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: string
          description: |
            Numeric amount. Decimal places depend on currency:
            - USD (fiat): 2 decimal places
            - USDA+ (stablecoin): 6 decimal places
          example: '10000.12'
        currency:
          type: string
          enum:
            - USD
            - USDA+
          description: >
            Currency code. USD = fiat (2 decimal places). USDA+ = on-chain
            stablecoin (6 decimal places).
          example: USD
    Chain:
      type: string
      enum:
        - ETH-SEPOLIA
      description: Blockchain network identifier
      example: ETH-SEPOLIA
    TransactionPayload:
      type: object
      required:
        - to
        - data
        - value
        - chainId
        - type
      description: >
        Unsigned transaction payload returned by the API. The bank signs this
        (adding `from`, `nonce`,

        and gas fields) and submits it to the network. The API does not include
        `gas` (gasLimit,

        maxFeePerGas, maxPriorityFeePerGas, or gasPrice), `from`, or `nonce`;
        the signer supplies those.
      properties:
        to:
          type: string
          description: Contract or recipient address (e.g. A+ token contract)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
        data:
          type: string
          description: Hex-encoded calldata for the contract call
          example: 0xa9059cbb000000000000000000000000...
        value:
          type: string
          description: Wei to send (hex string). Use "0x0" for ERC20 mint/burn/transfer.
          example: '0x0'
        chainId:
          type: integer
          description: Chain ID for the target network (e.g. 11155111 for Sepolia)
          example: 11155111
        type:
          type: integer
          description: |
            EIP-2718 transaction type. 0 = legacy, 1 = EIP-2930, 2 = EIP-1559.
            The signer adds gas fields according to this type.
          enum:
            - 0
            - 1
            - 2
          example: 2
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Human-readable error message
          example: Invalid request parameters
  headers:
    XRequestId:
      description: >
        Universally unique identifier (UUID v4) for the request. Helpful for
        identifying 

        a request when communicating with support.
      schema:
        type: string
        format: uuid
        example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
  responses:
    BadRequest:
      description: Bad request - Invalid request parameters
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            response:
              value:
                code: 400
                message: Invalid request parameters
    Unauthorized:
      description: >
        The request has not been applied because it lacks valid authentication
        credentials.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            response:
              value:
                code: 401
                message: Malformed authorization
    Forbidden:
      description: >
        The request has not been applied because the authenticated user does not
        have 

        sufficient permissions or the operation is not allowed.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            response:
              value:
                code: 403
                message: Insufficient permissions
    RateLimited:
      description: Too many requests - Rate limit exceeded
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            response:
              value:
                code: 429
                message: Rate limit exceeded
    InternalServerError:
      description: Internal server error
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            response:
              value:
                code: 500
                message: Internal server error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: API token for bank authentication

````