> ## 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.

# Init payment

> Create POS payment in it's initial state, which is WaitingMemberConfirmation. This means, that payment will be shown in mobile app where member should select payment methods and confirm the payment.



## OpenAPI

````yaml openapi/payment-v1.json POST /v1/payments/init
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/payments/init:
    post:
      tags:
        - Service2Service
      summary: Init payment
      description: >-
        Create POS payment in it's initial state, which is
        WaitingMemberConfirmation. This means, that payment will be shown in
        mobile app where member should select payment methods and confirm the
        payment.
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.PaymentRequestBase
          text/json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.PaymentRequestBase
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.PaymentRequestBase
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.PaymentCreatedResponse
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
      deprecated: true
components:
  schemas:
    PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.PaymentRequestBase:
      required:
        - amount
        - memberId
        - operationId
        - paymentLocation
        - receiptId
      type: object
      properties:
        paymentLocation:
          maxLength: 128
          minLength: 1
          type: string
          description: Payment location. Concatenation of StoreId + Terminal Id
        receiptId:
          maxLength: 64
          minLength: 1
          type: string
          description: Unique payment identifier
        memberId:
          maxLength: 36
          minLength: 1
          type: string
          description: >-
            Id of member who checked in on the POS, who suppose to pay for the
            purchase

            Must contain latin alphanumeric characters, max length 32. Allowed
            special characters: '-', '_'
        operationId:
          maxLength: 64
          minLength: 1
          type: string
          description: >-
            Unique identifier of initiate payment operation (should be same only
            for retries of the same operation)
        amount:
          minimum: 0
          type: number
          description: Amount to pay
          format: double
      additionalProperties: false
    PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.PaymentCreatedResponse:
      required:
        - paymentId
      type: object
      properties:
        paymentId:
          minLength: 1
          type: string
          description: >-
            Payment id used to manage initiated payment and retrieve payment
            status
      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

````