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

# Create payment - v2

> Create payment with specific type: POS, Ecommerce, ScanAndPay, ManualTopUp, SubscriptionTopUp. If requestMemberConfirmation = true, then this payment should be confirmed by member. Otherwise - will try to confirm payment automatically using 'Bonus' payment type.



## OpenAPI

````yaml openapi/payment-v1.json POST /v2/payments
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:
  /v2/payments:
    post:
      tags:
        - Service2Service
      summary: Create payment - v2
      description: >-
        Create payment with specific type: POS, Ecommerce, ScanAndPay,
        ManualTopUp, SubscriptionTopUp. If requestMemberConfirmation = true,
        then this payment should be confirmed by member. Otherwise - will try to
        confirm payment automatically using 'Bonus' payment type.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.CreatePaymentV2Request
            examples:
              POS payment without member confirmation:
                value:
                  type: POS
                  paymentLocation: 1001_23
                  receiptId: '26081000567474161980'
                  memberId: '6000001'
                  operationId: a55f49c4-026b-4497-b648-db7579e2e22b
                  amount: 123.34
                  requestMemberConfirmation: false
                  instantCapture: false
                  isRecurring: false
              POS payment that should be confirmed by member:
                value:
                  type: POS
                  paymentLocation: 1001_23
                  receiptId: '26081000567474245441'
                  memberId: '6000001'
                  operationId: a0336c2b-0583-4e7d-b242-f3721155895c
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              E-commerce payment that should be confirmed by member:
                value:
                  type: Ecommerce
                  storeId: '1001'
                  receiptId: '2608100056747429067'
                  memberId: '6000001'
                  operationId: fe4fc57c-5961-4421-87cc-cdbd10ec40e7
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              ScanAndPay payment that should be confirmed by member:
                value:
                  type: ScanAndPay
                  storeId: '1001'
                  receiptId: '26081000567474880411'
                  memberId: '6000001'
                  operationId: aae1edef-047c-4c8b-8a56-eeaf7b550fce
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              ManualTopUp payment that should be reserved and captured instantaneous:
                value:
                  type: ManualTopUp
                  memberId: '6000001'
                  operationId: 522447c1-a58e-4e9c-976e-249b9bb9618a
                  amount: 123.34
                  requestMemberConfirmation: false
                  paymentMethods:
                    - id: Card
                  instantCapture: true
                  isRecurring: false
              SubscriptionTopUp payment that should be reserved and captured instantaneous:
                value:
                  type: SubscriptionTopUp
                  memberId: '6000001'
                  operationId: 50ce941a-a599-4931-8f55-66116f9f2cf9
                  amount: 123.34
                  requestMemberConfirmation: false
                  paymentMethods:
                    - id: Card
                  instantCapture: true
                  isRecurring: true
          text/json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.CreatePaymentV2Request
            examples:
              POS payment without member confirmation:
                value:
                  type: POS
                  paymentLocation: 1001_23
                  receiptId: '26081000567474161980'
                  memberId: '6000001'
                  operationId: a55f49c4-026b-4497-b648-db7579e2e22b
                  amount: 123.34
                  requestMemberConfirmation: false
                  instantCapture: false
                  isRecurring: false
              POS payment that should be confirmed by member:
                value:
                  type: POS
                  paymentLocation: 1001_23
                  receiptId: '26081000567474245441'
                  memberId: '6000001'
                  operationId: a0336c2b-0583-4e7d-b242-f3721155895c
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              E-commerce payment that should be confirmed by member:
                value:
                  type: Ecommerce
                  storeId: '1001'
                  receiptId: '2608100056747429067'
                  memberId: '6000001'
                  operationId: fe4fc57c-5961-4421-87cc-cdbd10ec40e7
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              ScanAndPay payment that should be confirmed by member:
                value:
                  type: ScanAndPay
                  storeId: '1001'
                  receiptId: '26081000567474880411'
                  memberId: '6000001'
                  operationId: aae1edef-047c-4c8b-8a56-eeaf7b550fce
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              ManualTopUp payment that should be reserved and captured instantaneous:
                value:
                  type: ManualTopUp
                  memberId: '6000001'
                  operationId: 522447c1-a58e-4e9c-976e-249b9bb9618a
                  amount: 123.34
                  requestMemberConfirmation: false
                  paymentMethods:
                    - id: Card
                  instantCapture: true
                  isRecurring: false
              SubscriptionTopUp payment that should be reserved and captured instantaneous:
                value:
                  type: SubscriptionTopUp
                  memberId: '6000001'
                  operationId: 50ce941a-a599-4931-8f55-66116f9f2cf9
                  amount: 123.34
                  requestMemberConfirmation: false
                  paymentMethods:
                    - id: Card
                  instantCapture: true
                  isRecurring: true
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.CreatePaymentV2Request
            examples:
              POS payment without member confirmation:
                value:
                  type: POS
                  paymentLocation: 1001_23
                  receiptId: '26081000567474161980'
                  memberId: '6000001'
                  operationId: a55f49c4-026b-4497-b648-db7579e2e22b
                  amount: 123.34
                  requestMemberConfirmation: false
                  instantCapture: false
                  isRecurring: false
              POS payment that should be confirmed by member:
                value:
                  type: POS
                  paymentLocation: 1001_23
                  receiptId: '26081000567474245441'
                  memberId: '6000001'
                  operationId: a0336c2b-0583-4e7d-b242-f3721155895c
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              E-commerce payment that should be confirmed by member:
                value:
                  type: Ecommerce
                  storeId: '1001'
                  receiptId: '2608100056747429067'
                  memberId: '6000001'
                  operationId: fe4fc57c-5961-4421-87cc-cdbd10ec40e7
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              ScanAndPay payment that should be confirmed by member:
                value:
                  type: ScanAndPay
                  storeId: '1001'
                  receiptId: '26081000567474880411'
                  memberId: '6000001'
                  operationId: aae1edef-047c-4c8b-8a56-eeaf7b550fce
                  amount: 123.34
                  requestMemberConfirmation: true
                  instantCapture: false
                  isRecurring: false
              ManualTopUp payment that should be reserved and captured instantaneous:
                value:
                  type: ManualTopUp
                  memberId: '6000001'
                  operationId: 522447c1-a58e-4e9c-976e-249b9bb9618a
                  amount: 123.34
                  requestMemberConfirmation: false
                  paymentMethods:
                    - id: Card
                  instantCapture: true
                  isRecurring: false
              SubscriptionTopUp payment that should be reserved and captured instantaneous:
                value:
                  type: SubscriptionTopUp
                  memberId: '6000001'
                  operationId: 50ce941a-a599-4931-8f55-66116f9f2cf9
                  amount: 123.34
                  requestMemberConfirmation: false
                  paymentMethods:
                    - id: Card
                  instantCapture: true
                  isRecurring: true
      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
components:
  schemas:
    PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.CreatePaymentV2Request:
      required:
        - amount
        - memberId
        - operationId
        - type
      type: object
      properties:
        type:
          minLength: 1
          type: string
          description: Payment type.
        paymentLocation:
          maxLength: 128
          type: string
          description: Payment location. Required only for POS payments.
          nullable: true
        storeId:
          maxLength: 64
          type: string
          description: Store ID. Required only for Ecommerce, ScanAndPay payments.
          nullable: true
        receiptId:
          maxLength: 64
          type: string
          description: >-
            Unique payment identifier. Required for POS, Ecommerce, ScanAndPay
            payments.
          nullable: true
        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
        requestMemberConfirmation:
          type: boolean
          description: Determines whether member confirmation is needed for this payment
        paymentMethods:
          minItems: 1
          type: array
          items:
            $ref: >-
              #/components/schemas/PaymentCoordinator.Api.Controllers.Models.PaymentMethodSelection
          description: |-
            List of payment methods chosen for payment.
            This parameter is optional.
            Currently only required for ManualTopUp, SubscriptionTopUp payments.
          nullable: true
        instantCapture:
          type: boolean
          description: |-
            Indicates whether a capture of the reservation is instantaneous.
            This parameter is optional.
            Currently only required for ManualTopUp, SubscriptionTopUp payments.
          default: false
        isRecurring:
          type: boolean
          description: |-
            Indicates whether the payment is recurring.
            This parameter is optional.
            Currently only used for SubscriptionTopUp payments.
          default: false
      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
    PaymentCoordinator.Api.Controllers.Models.PaymentMethodSelection:
      required:
        - id
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: Payment method type id
        parameters:
          type: object
          additionalProperties:
            nullable: true
          description: >-
            Payment method optional parameters (e.g. 'saveCard', 'redirectTo'
            for 'ExternalCard' payment method)
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````