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

# Set up payment location.

> Set up a new payment location or update an existing one. A paymentLocation is required either way. Having a registered payment location is a prerequisite for the POS system to create payments.



## OpenAPI

````yaml openapi/payment-v1.json POST /v1/payment-locations/{paymentLocation}/setup
openapi: 3.0.4
info:
  title: PaymentCoordinator.Api
  version: v1
servers:
  - url: https://{host}/payment
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/payment-locations/{paymentLocation}/setup:
    post:
      tags:
        - Service2Service
      summary: Set up payment location.
      description: >-
        Set up a new payment location or update an existing one. A
        paymentLocation is required either way. Having a registered payment
        location is a prerequisite for the POS system to create payments.
      parameters:
        - name: paymentLocation
          in: path
          description: >-
            Unique identifier of POS in payment service. Recommended pattern is
            '{storeId}_{posId}'.
          required: true
          schema:
            maxLength: 128
            type: string
      requestBody:
        description: The payment location details
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentLocationController.SetupPaymentLocationRequest
            examples:
              Regular POS payment location:
                value:
                  storeId: '1234'
                  force: false
                  type: Cashier
              Regular POS payment location with printed QR code:
                value:
                  qrCode: '123456557546345345'
                  storeId: '1234'
                  force: false
                  type: Cashier
              Self-checkout POS payment location:
                value:
                  storeId: '1234'
                  force: false
                  type: SelfCheckout
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.EmptyResult'
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
components:
  schemas:
    PaymentCoordinator.Api.Controllers.Service2Service.PaymentLocationController.SetupPaymentLocationRequest:
      required:
        - storeId
        - type
      type: object
      properties:
        qrCode:
          maxLength: 64
          type: string
          description: The qr code assigned to the payment location
          nullable: true
        storeId:
          maxLength: 64
          minLength: 1
          type: string
          description: The store identifier
        force:
          type: boolean
          description: >-
            Allows to re-assign the qrCode if it's already assigned to another
            payment location
        type:
          minLength: 1
          type: string
          description: Payment location type
      additionalProperties: false
    Microsoft.AspNetCore.Mvc.EmptyResult:
      type: object
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````