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

# External Action Callback

> Used for updating the state of a transaction on the checkout flow.



## OpenAPI

````yaml openapi/payment-v1.json POST /v1/payments/external-action
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/external-action:
    post:
      tags:
        - Service2Service
      summary: External Action Callback
      description: Used for updating the state of a transaction on the checkout flow.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.ExternalActionRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.ExternalActionRequest
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/PaymentCoordinator.Api.Controllers.Service2Service.PaymentController.ExternalActionRequest
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.EmptyResult'
        '202':
          description: Accepted
        '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.ExternalActionRequest:
      required:
        - amount
        - eventType
        - operationId
        - transactionId
      type: object
      properties:
        operationId:
          maxLength: 64
          minLength: 1
          type: string
          description: Unique identifier of initiate payment operation
        transactionId:
          minLength: 1
          type: string
          description: External transaction id
        amount:
          minimum: 0
          type: number
          description: Amount
          format: double
        eventType:
          minLength: 1
          type: string
          description: Event type
        failureCause:
          type: string
          description: Failure cause
          nullable: true
      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

````