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

# Create store

> Create a store

scopes:
- admin:accounts
- write:accounts




## OpenAPI

````yaml /mintlify-docs/openapi/spec-payments-v2.yaml post /accounts/{aid}/stores
openapi: 3.0.0
info:
  title: Payments API v2
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: |
    Public endpoints for payments served under the account-scoped URL format
    `https://api.dintero.com/v1/accounts/{aid}/...`.
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
servers:
  - url: https://api.dintero.com/v1
security:
  - JWT: []
tags:
  - name: Transactions
    x-displayName: Transactions
    description: |
      View and perform operations on transactions
  - name: session
    x-displayName: Sessions
    description: |
      A Checkout Session relates to an order in your system.
      When an order has been placed you create a corresponding Checkout Session
      to receive payment for that order.
  - name: payment
    x-displayName: Payment
    description: |
      Resources used by the customer aka user to complete the payment of a
      session.
  - name: settlements
    x-displayName: Settlement reports
    description: Get settlement reports generated per payout
  - name: settlements.configuration
    x-displayName: Configuration
    description: Configure settlement reports
  - name: reports
    x-displayName: Reports
    description: List the generated monthly transaction reports
  - name: Sellers
    x-displayName: Sellers
    description: Manage the signup of a new Seller / Merchant account
  - name: example-session-callbacks
    x-displayName: Example Callbacks
    description: Example of callbacks delivered
  - name: v2-config-payout-destinations
    x-displayName: Sellers
    description: Get payout data for sellers
  - name: Card Tokens
    description: |
      Manage card tokens
  - name: terminals
    x-displayName: Terminals
    description: Terminal operations
  - name: v2-fund-transfers
    x-displayName: Fund transfers
    description: Transfer funds between sellers
  - name: payout-destinations
    x-displayName: payout destinations
    description: |
      Payout destinations
  - name: account-stores
    x-displayName: stores
    description: |
      Manage account stores
  - name: account-terminals
    x-displayName: terminals
    description: |
      Manage account terminals
  - name: report-configuration
    x-displayName: Report configuration
    description: Manage report configurations
  - name: kpi
    x-displayName: KPI
    description: Get KPI data
paths:
  /accounts/{aid}/stores:
    post:
      tags:
        - account-stores
      summary: aid_account_management_stores_post
      description: |
        Create a store

        scopes:
        - admin:accounts
        - write:accounts
      operationId: aid_account_management_stores_post
      parameters:
        - $ref: '#/components/parameters/accountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreInput'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/Store'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - JWT: []
components:
  parameters:
    accountId:
      name: aid
      description: |
        An id that uniquely identifies the account.
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}\d{8}$
        minLength: 9
        maxLength: 9
  schemas:
    StoreInput:
      allOf:
        - $ref: '#/components/schemas/StoreUpdateInput'
        - type: object
          properties:
            store_id:
              type: string
              example: S312
              maxLength: 20
              pattern: ^[A-Za-z0-9._~-]{1,20}$
              description: >
                Client-supplied store identifier. If omitted, a server-side
                generated identifier is used (e.g. `T12345678-0001`).
    StoreUpdateInput:
      type: object
      required:
        - store_name
        - phone_number
        - organization
      properties:
        organization:
          type: object
          description: The organization for the store
          required:
            - organization_number
          properties:
            organization_number:
              type: string
            country:
              type: string
              readOnly: true
              pattern: ^[A-Z]{2}$
              description: ISO 3166-1 country code for the organization number
              example: 'NO'
            type:
              type: string
              default: main_unit
              enum:
                - main_unit
                - sub_unit
              description: >
                - `main_unit` - the store is the payout destination's company.
                The store shows the payout destination's organization and
                address.

                - `sub_unit` - the store is a sub-unit of the payout
                destination's company in the Norwegian business register
                (BRREG). `organization.name` and `address` are taken from BRREG.
                The request fails if BRREG has no address for the sub-unit.
            name:
              type: string
            trade_name:
              type: string
        store_name:
          type: string
        email:
          type: string
          format: email
        phone_number:
          type: string
          format: E.164
          pattern: ^\+[1-9]\d{1,14}$
          description: A phone number in E.164 format
          example: '+4799999999'
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
            - required:
                - postal_code
        coordinates:
          type: object
          properties:
            latitude:
              type: number
              format: float
              example: 59.949923
            longitude:
              type: number
              format: float
              example: 10.766888
          required:
            - latitude
            - longitude
          description: The coordinates of the store
        website:
          type: string
        payout_destination:
          type: object
          description: >
            The payout destination associated with this store.


            A store with a payout destination will get all its properties
            (`address`, `phone_number`, etc.) set by validated data, so you will
            not be allowed to set a custom address when a payout destination is
            set.


            The `organization_number` must match the organization number of the
            payout destination.


            These exceptions do not apply to the payout destination's sub-units,
            where a different sub-unit `organization_number` is allowed and the
            details will be set by what is available in the public registers.
          required:
            - payout_destination_id
          properties:
            payout_destination_id:
              $ref: '#/components/schemas/PayoutDestinationId'
    AccountStore:
      type: object
      allOf:
        - $ref: '#/components/schemas/StoreBase'
        - type: object
          properties:
            terminals:
              type: array
              description: |
                Terminals associated with this store.
              items:
                $ref: '#/components/schemas/StoreTerminal'
            enrollment:
              $ref: '#/components/schemas/StoreEnrollment'
            bax_merchant_agreement:
              description: |
                The store's current BankAxept merchant agreement, if any.
              allOf:
                - $ref: '#/components/schemas/BaxMerchantAgreementStatus'
            payment_options:
              type: array
              readOnly: true
              description: >
                Payment options of the store and their currencies. Dintero sets
                them when the store is created, from the country of the payout
                destination, or of the sub-unit in the Norwegian business
                register (BRREG). Norway gets NOK, Sweden SEK and Denmark DKK.
              items:
                $ref: '#/components/schemas/StorePaymentOption'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
    Address:
      type: object
      required:
        - address_line
        - postal_place
        - country
      properties:
        address_line:
          type: string
          example: Sommerkroveien 34
        address_line_2:
          type: string
          example: PB 123
        postal_code:
          type: string
          example: '0349'
        postal_place:
          type: string
          example: Oslo
        country:
          type: string
          format: iso-3166-1
          description: |
            ISO 3166-1 country code
          example: 'NO'
    PayoutDestinationId:
      type: string
      maxLength: 40
      pattern: ^[A-Za-z0-9_-]+$
      example: PD032
    StoreBase:
      type: object
      required:
        - store_id
      allOf:
        - $ref: '#/components/schemas/StoreInput'
        - $ref: '#/components/schemas/StoreReadOnly'
    StoreTerminal:
      type: object
      required:
        - terminal_id
        - device_serial_number
      properties:
        terminal_id:
          type: string
          example: T312
        device_serial_number:
          type: string
          example: '123444555679'
        status:
          $ref: '#/components/schemas/TerminalStatus'
        status_reason:
          description: Context explaining why the terminal has its current status.
          allOf:
            - $ref: '#/components/schemas/TerminalStatusReason'
    StoreEnrollment:
      type: object
      description: |
        Details about the enrollment associated with this store.
      required:
        - type
        - status
        - pf_account_id
      properties:
        type:
          type: string
          enum:
            - bambora_ipp
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
        pf_account_id:
          type: string
          description: |
            Bambora IPP sub-merchant account identifier.
    BaxMerchantAgreementStatus:
      type: object
      required:
        - id
        - bax_number
        - status
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        bax_number:
          type: string
          example: '1234567'
        status:
          type: string
          enum:
            - valid
            - mismatch
          description: >
            - `valid` - the agreement matches the store

            - `mismatch` - the store no longer matches the agreement, see
            `mismatched_fields`. Create a new agreement, or change the store
            back so it matches.


            The status is checked again when the store or its payout destination
            changes.
        mismatched_fields:
          type: array
          description: |
            Fields where the store no longer matches the agreement
          items:
            type: string
            enum:
              - organization_number
              - name
              - address_line
              - postal_code
    StorePaymentOption:
      type: object
      required:
        - type
        - currencies
      properties:
        type:
          type: string
          enum:
            - seitatech.in_person
          example: seitatech.in_person
        currencies:
          type: array
          description: |
            Currencies the store accepts for this payment option.
          items:
            type: string
            format: iso4217-code
            example: NOK
    StoreReadOnly:
      type: object
      required:
        - id
        - created_at
        - created_by
        - updated_at
        - updated_by
        - status
        - verified
        - number_of_terminals
      properties:
        id:
          type: string
        created_at:
          type: string
        created_by:
          type: string
        updated_at:
          type: string
        updated_by:
          type: string
        status:
          type: string
          enum:
            - ACTIVE
            - PENDING
            - SUSPENDED
            - DELETED
            - ERROR
        verified:
          type: boolean
          description: The store data have been verified
        number_of_terminals:
          type: integer
          description: Number of terminals associated with a store
        payout_destination:
          $ref: '#/components/schemas/StorePayoutDestination'
        operator_payout_destinations:
          type: array
          description: >
            Operator destinations associated with this store. Included when
            `includes=operator_payout_destinations` is used.
          items:
            $ref: '#/components/schemas/OperatorPayoutDestination'
    TerminalStatus:
      type: string
      description: >
        How far the terminal has got through setup, and whether it can take
        payments. Only an `ACTIVE` terminal can be used for a payment; a session
        referencing a terminal in any other status is rejected.


        This says nothing about whether the terminal is online right now - for
        that, send a [`poll_terminal` terminal
        operation](/docs/checkout/in-person/terminal-operations#check-that-a-terminal-is-reachable).


        - `PENDING`: The terminal has been registered and Dintero is configuring
        it. No action needed, the status updates on its own. See `status_reason`
        for what is currently happening.

        - `ACTION_REQUIRED`: Dintero has finished its side, and the terminal now
        has to fetch its configuration from its own on-screen menu before it can
        be activated. Also set when a configuration fetch was attempted and did
        not complete, in which case fetch the settings again.

        - `ACTIVE`: The terminal is configured and ready to accept payments.

        - `INACTIVE`: The device has been disabled and cannot take payments.
        Re-enabling it is not self-service - contact Dintero support.

        - `ERROR`: Setting up the terminal failed. Delete the terminal and
        register it again, or contact Dintero support.

        - `DELETED`: The terminal has been removed from the account. Register
        the terminal again to reuse it.
      readOnly: true
      enum:
        - DELETED
        - PENDING
        - ACTION_REQUIRED
        - ACTIVE
        - INACTIVE
        - ERROR
    TerminalStatusReason:
      type: string
      description: >
        Context explaining why the terminal has its current status.


        Applies to terminals with status `PENDING`:


        - `ADDING`: the terminal is being registered and configured to Dintero.

        - `ACTIVATING`: the terminal is being activated.


        Applies to terminals with status `ACTION_REQUIRED`:


        - `CHECK_UPDATE`: the terminal must fetch its settings, then run a
        `check_update` terminal operation to complete activation.

        - `START_ACTIVATION`: an activation task should be run to activate the
        terminal, using `POST /admin/terminals/{terminal_id}/activations`.
      enum:
        - ADDING
        - ACTIVATING
        - CHECK_UPDATE
        - START_ACTIVATION
    StorePayoutDestination:
      type: object
      required:
        - status
        - type
      properties:
        merchant_category_code:
          type: string
          pattern: ^\d{1,4}
          format: mcc
          example: '2741'
        status:
          $ref: '#/components/schemas/ApprovalStatus'
        type:
          $ref: '#/components/schemas/LegalEntityType'
    OperatorPayoutDestination:
      type: object
      required:
        - payout_destination_id
        - status
        - type
      properties:
        payout_destination_id:
          type: string
          description: The unique identifier of the payout destination
        organization_number:
          type: string
          description: National organization number valid in the country specified
        name:
          type: string
          description: The name of the organization
        trade_name:
          type: string
          description: The trade name of the organization
        merchant_category_code:
          type: string
          pattern: ^\d{1,4}
          format: mcc
          example: '2741'
        status:
          $ref: '#/components/schemas/ApprovalStatus'
        type:
          $ref: '#/components/schemas/LegalEntityType'
    ApprovalStatus:
      type: string
      enum:
        - ACTIVE
        - DECLINED
        - UNDER_MANUAL_REVIEW
        - AUTOMATIC_REVIEW
        - WAITING_FOR_SIGNATURE
        - WAITING_FOR_DECLARATION
        - ERROR
        - ARCHIVED
        - WAITING_FOR_DETAILS
        - TERMINATED
    LegalEntityType:
      type: string
      description: >
        - For a company seller select `company` or leave blank. Required fields
        are
          `organization_number` and `country_code`.
        - For an individual seller select `individual`. Provide optional fields
        in
          the individual object.
      enum:
        - company
        - individual
  responses:
    Store:
      description: Store
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountStore'
    BadRequest:
      description: Bad / Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AccessForbidden:
      description: Access forbidden, invalid JWT token was used
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    JWT:
      type: http
      description: >
        Bearer authentication (token authentication) should be used for
        accessing the API.


        Use [Get Token](/api-reference/authenticate/aid_auths_oauth_token_post)
        to get an access token for client credentials.

        Pass the token in the request header:

            Authorization: Bearer {access_token}

        where the **access_token** is JSON Web Tokens (JWT).
      scheme: bearer
      bearerFormat: JWT

````

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