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

# Consultar transaccion ecommerce

> Consulta el estado de una transaccion generada previamente por el API de autorizacion.

Este endpoint soporta flujos con Tarjeta, Yape, Transferencia Bancaria, QR, Cuotealo y PagoEfectivo. Antes de consumirlo, solicita tu Access Token en [Autenticacion](/autenticacion#param-post-token). Si necesitas la guia funcional paso a paso, revisa [Tarjeta](/payin/consulta-tarjeta), [Yape](/payin/consulta-yape), [Transferencia Bancaria](/payin/consulta-transferencia-bancaria), [QR](/payin/consulta-qr), [Cuotealo](/payin/consulta-cuotealo) o [PagoEfectivo](/payin/consulta-pagoefectivo).



## OpenAPI

````yaml /openapi.json get /charges/{merchant_code}/{merchant_operation_number}/{transaction_id}
openapi: 3.1.0
info:
  title: Alignet API
  version: 1.0.0
  description: >-
    Referencia OpenAPI para autenticacion, autorizacion, consulta, cancelacion,
    devoluciones y notificaciones de pagos ecommerce en PayIn.
servers:
  - url: https://auth.preprod.alignet.io
    description: Pre-Produccion
  - url: https://auth.alignet.io
    description: Produccion
security: []
paths:
  /charges/{merchant_code}/{merchant_operation_number}/{transaction_id}:
    get:
      tags:
        - PayIn
      summary: Consultar transaccion ecommerce
      description: >-
        Consulta el estado de una transaccion generada previamente por el API de
        autorizacion.


        Este endpoint soporta flujos con Tarjeta, Yape, Transferencia Bancaria,
        QR, Cuotealo y PagoEfectivo. Antes de consumirlo, solicita tu Access
        Token en [Autenticacion](/autenticacion#param-post-token). Si necesitas
        la guia funcional paso a paso, revisa
        [Tarjeta](/payin/consulta-tarjeta), [Yape](/payin/consulta-yape),
        [Transferencia Bancaria](/payin/consulta-transferencia-bancaria),
        [QR](/payin/consulta-qr), [Cuotealo](/payin/consulta-cuotealo) o
        [PagoEfectivo](/payin/consulta-pagoefectivo).
      operationId: getEcommercePaymentStatus
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Token Bearer obtenido desde autenticacion.
          schema:
            type: string
            default: Bearer {{access_token}}
          example: Bearer {{access_token}}
        - name: ALG-API-VERSION
          in: header
          required: true
          description: Version del API a usar.
          schema:
            type: string
            default: '1709847567'
          example: '1709847567'
        - name: payment-facilitator-code
          in: header
          required: false
          description: Identificador del Facilitador de Pago.
          schema:
            type: string
          example: your_pf_code
        - name: merchant_code
          in: path
          required: true
          description: Identificador del comercio.
          schema:
            type: string
          example: your_merchant_code
        - name: merchant_operation_number
          in: path
          required: true
          description: Numero de operacion registrado por el comercio.
          schema:
            type: string
          example: '2391645'
        - name: transaction_id
          in: path
          required: true
          description: Identificador unico de la transaccion consultada.
          schema:
            type: string
          example: 5hk8rwa3h3cq9oyfs3a28v1ms
      responses:
        '200':
          description: Transaccion consultada correctamente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeQueryResponse'
              examples:
                card:
                  summary: Consulta de tarjeta
                  value:
                    success: true
                    merchant_code: your_merchant_code
                    operation:
                      merchant_operation_number: '2391645'
                      state: AUTORIZADO
                      amount: '15000'
                      currency: '604'
                      transactions:
                        - transaction_id: 5hk8rwa3h3cq9oyfs3a28v1ms
                          channel: ecommerce
                          state: AUTORIZADO
                          state_reason: Approval and completed successfully
                          amount: '15000'
                          currency: '604'
                          payment_method:
                            method_name: CARD
                            method_details:
                              masked_pan: 455788******9268
                              brand: VISA
                              bin: '455788'
                              last_pan: '9268'
                              card_type: DEBIT
                              card_country: PE
                              issuer: BANCO DE CREDITO DEL PERU - BCP
                              installments:
                                plan: NORMAL
                                installment_number: '2'
                              redirect_url: https://pay-me.com
                              callback_url: https://pay-me.com/callback
                          processor_response:
                            authorization_code: '055552'
                            brand_transaction_id: A055552
                            result_message:
                              code: '00'
                              description: Approval and completed successfully
                          lifecycle:
                            - state: REGISTRADO
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                            - state: PENDIENTE
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                            - state: AUTORIZADO
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                    meta:
                      status:
                        code: '00'
                        message_ilgn:
                          - locale: es_PE
                            value: Procesado correctamente
                yape:
                  summary: Consulta de Yape
                  value:
                    success: true
                    merchant_code: your_merchant_code
                    operation:
                      merchant_operation_number: '2391645'
                      state: AUTORIZADO
                      amount: '15000'
                      currency: '604'
                      transactions:
                        - transaction_id: 5hk8rwa3h3cq9oyfs3a28v1ms
                          channel: ecommerce
                          state: AUTORIZADO
                          state_reason: Approval and completed successfully
                          amount: '15000'
                          currency: '604'
                          payment_method:
                            method_name: YAPE
                            method_details:
                              phone:
                                country_code: '+51'
                                subscriber: '969929157'
                              masked_pan: 455788******9268
                              brand: VISA
                              bin: '455788'
                              last_pan: '9268'
                              card_type: DEBIT
                              card_country: PE
                              issuer: BANCO DE CREDITO DEL PERU - BCP
                              callback_url: https://pay-me.com/callback
                          processor_response:
                            authorization_code: '055552'
                            brand_transaction_id: A055552
                            result_message:
                              code: '00'
                              description: Approval and completed successfully
                          lifecycle:
                            - state: REGISTRADO
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                            - state: PENDIENTE
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                            - state: AUTORIZADO
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                    meta:
                      status:
                        code: '00'
                        message_ilgn:
                          - locale: es_PE
                            value: Procesado correctamente
                bank_transfer:
                  summary: Consulta de transferencia bancaria
                  value:
                    success: true
                    merchant_code: your_merchant_code
                    operation:
                      merchant_operation_number: '2391645'
                      created_at:
                        utc_time: '2024-03-12T22:49:36.018Z'
                        unix_time: 1710282940
                      state: PENDIENTE
                      amount: '15000'
                      currency: '604'
                      transactions:
                        - transaction_id: 5hk8rwa3h3cq9oyfs3a28v1ms
                          channel: ecommerce
                          state: PENDIENTE
                          state_reason: Url generada para continuar con el pago
                          amount: '15000'
                          currency: '604'
                          payment_method:
                            method_name: BANK_TRANSFER
                            method_details:
                              redirect_url: https://pay-me.com
                              callback_url: https://pay-me.com/callback
                          continue_url: >-
                            https://api.dev.alignet.io/payment/continue/bank_transfer/c7dagnrwgxgh1b6kzwirheezv
                          expiration_date:
                            utc_time: '2024-03-12T22:49:36.018Z'
                            unix_time: 1710282940
                          processor_response: null
                          additional_fields: null
                          lifecycle:
                            - state: REGISTRADO
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                            - state: PENDIENTE
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                    meta:
                      status:
                        code: '00'
                        message_ilgn:
                          - locale: es_PE
                            value: Procesado correctamente
                qr:
                  summary: Consulta de QR
                  value:
                    success: true
                    merchant_code: your_merchant_code
                    operation:
                      merchant_operation_number: '2391645'
                      created_at:
                        utc_time: '2024-03-12T22:49:36.018Z'
                        unix_time: 1710282940
                      state: PENDIENTE
                      amount: '15000'
                      currency: '604'
                      transactions:
                        - transaction_id: 5hk8rwa3h3cq9oyfs3a28v1ms
                          channel: ecommerce
                          state: PENDIENTE
                          state_reason: QR generado, pendiente de pago
                          amount: '15000'
                          currency: '604'
                          payment_method:
                            method_name: QR
                            method_details:
                              callback_url: https://pay-me.com/callback
                          expiration_date:
                            utc_time: '2024-03-12T22:49:36.018Z'
                            unix_time: 1710282940
                          processor_response:
                            date: '2024-03-21 14:53:15.096596'
                            qr_image: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...
                            qr_id: e5e36834a2294d83868d587af8ae8e13
                            result_message:
                              code: '0'
                              description: Exito
                          additional_fields: null
                          lifecycle:
                            - state: REGISTRADO
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                            - state: PENDIENTE
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                    meta:
                      status:
                        code: '00'
                        message_ilgn:
                          - locale: es_PE
                            value: Procesado correctamente
                cuotealo:
                  summary: Consulta de Cuotealo
                  value:
                    success: true
                    merchant_code: your_merchant_code
                    operation:
                      merchant_operation_number: '2391645'
                      created_at:
                        utc_time: '2024-03-12T22:49:36.018Z'
                        unix_time: 1710282940
                      state: PENDIENTE
                      amount: '15000'
                      currency: '604'
                      transactions:
                        - transaction_id: 5hk8rwa3h3cq9oyfs3a28v1ms
                          channel: ecommerce
                          state: PENDIENTE
                          state_reason: Url generada para continuar con el pago
                          amount: '15000'
                          currency: '604'
                          payment_method:
                            method_name: CUOTEALO
                            method_details:
                              redirect_url: https://pay-me.com
                              callback_url: https://pay-me.com/callback
                          continue_url: >-
                            https://api.dev.alignet.io/payment/continue/cuotealo/c7dagnrwgxgh1b6kzwirheezv
                          expiration_date:
                            utc_time: '2024-03-12T22:49:36.018Z'
                            unix_time: 1710282940
                          processor_response: null
                          additional_fields: null
                          lifecycle:
                            - state: REGISTRADO
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                            - state: PENDIENTE
                              date:
                                utc_time: '2024-03-12T22:49:36.018Z'
                                unix_time: 1710282940
                    meta:
                      status:
                        code: '00'
                        message_ilgn:
                          - locale: es_PE
                            value: Procesado correctamente
                pagoefectivo:
                  summary: Consulta de PagoEfectivo
                  value:
                    success: true
                    merchant_code: your_merchant_code
                    operation:
                      merchant_operation_number: '7649167'
                      state: PENDIENTE
                      amount: '121900'
                      currency: '604'
                      transactions:
                        - transaction_id: a9e9040spd17ba3tdw42u4uv3
                          channel: ecommerce
                          state: PENDIENTE
                          state_reason: Codigo CIP generado exitosamente
                          amount: '121900'
                          currency: '604'
                          additional_fields: null
                          payment_method:
                            method_name: PAGOEFECTIVO
                            method_details:
                              callback_url: https://pay-me.com/callback
                          expiration_date:
                            utc_time: '2024-07-06T16:20:16.345140+00:00'
                            unix_time: 1720282816
                          processor_response:
                            cip: '1508405'
                            cip_url: >-
                              https://pre1a.payment.pagoefectivo.pe/72217FA5-4580-4B16-A345-24F028F53356.html
                            result_message:
                              code: '100'
                              description: Solicitud exitosa.
                          lifecycle:
                            - state: REGISTRADO
                              date:
                                utc_time: '2024-07-05T16:20:16'
                                unix_time: 1720196416
                            - state: PENDIENTE
                              date:
                                utc_time: '2024-07-05T16:20:16'
                                unix_time: 1720196416
                    meta:
                      status:
                        code: '00'
                        message_ilgn:
                          - locale: es_PE
                            value: Procesado correctamente
        '400':
          description: Request invalido.
        '401':
          description: Token invalido o expirado.
      servers:
        - url: https://api.preprod.alignet.io
          description: Pre-Produccion
        - url: https://api.alignet.io
          description: Produccion
components:
  schemas:
    ChargeQueryResponse:
      type: object
      required:
        - success
        - merchant_code
        - operation
        - meta
      properties:
        success:
          type: boolean
          example: true
        merchant_code:
          type: string
          example: your_merchant_code
        operation:
          $ref: '#/components/schemas/ChargeQueryOperation'
        meta:
          $ref: '#/components/schemas/ChargeMeta'
    ChargeQueryOperation:
      type: object
      required:
        - merchant_operation_number
        - state
        - amount
        - currency
        - transactions
      properties:
        merchant_operation_number:
          type: string
          example: '2391645'
        created_at:
          $ref: '#/components/schemas/TransactionLifecycleDate'
        state:
          type: string
          example: AUTORIZADO
        amount:
          type: string
          example: '15000'
        currency:
          type: string
          example: '604'
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/ChargeQueryTransaction'
    ChargeMeta:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ChargeMetaStatus'
    TransactionLifecycleDate:
      type: object
      required:
        - utc_time
        - unix_time
      properties:
        utc_time:
          type: string
          example: '2024-03-12T22:49:36.018Z'
        unix_time:
          type: integer
          example: 1710282940
    ChargeQueryTransaction:
      type: object
      required:
        - transaction_id
        - channel
        - state
        - amount
        - currency
        - payment_method
        - lifecycle
      properties:
        transaction_id:
          type: string
          example: 5hk8rwa3h3cq9oyfs3a28v1ms
        channel:
          type: string
          example: ecommerce
        state:
          type: string
          example: AUTORIZADO
        state_reason:
          type: string
          example: Approval and completed successfully
        continue_url:
          type: string
          example: >-
            https://api.dev.alignet.io/payment/continue/card/81vrxn30vja1gwcfsdng4i5g5
        amount:
          type: string
          example: '15000'
        currency:
          type: string
          example: '604'
        payment_method:
          description: Metodo de pago utilizado y detalle disponible segun el flujo.
          oneOf:
            - $ref: '#/components/schemas/CardTransactionPaymentMethod'
            - $ref: '#/components/schemas/YapeTransactionPaymentMethod'
            - $ref: '#/components/schemas/BankTransferTransactionPaymentMethod'
            - $ref: '#/components/schemas/CuotealoTransactionPaymentMethod'
            - $ref: '#/components/schemas/PagoEfectivoTransactionPaymentMethod'
            - $ref: '#/components/schemas/QrTransactionPaymentMethod'
        expiration_date:
          $ref: '#/components/schemas/TransactionExpirationDate'
        processor_response:
          $ref: '#/components/schemas/ProcessorResponse'
        authentication_result:
          $ref: '#/components/schemas/TransactionAuthenticationResult'
        risk_evaluation:
          type:
            - object
            - 'null'
          example: null
        additional_fields:
          type:
            - object
            - 'null'
          example: null
        lifecycle:
          type: array
          items:
            $ref: '#/components/schemas/TransactionLifecycleEvent'
    ChargeMetaStatus:
      type: object
      properties:
        code:
          type: string
          description: >-
            Codigo del resultado tecnico del servicio o request. No valida si un
            pago fue autorizado o denegado; para eso usa el estado de la
            transaccion.
          example: '00'
        message_ilgn:
          type: array
          items:
            $ref: '#/components/schemas/ChargeStatusMessage'
    CardTransactionPaymentMethod:
      title: Tarjeta
      type: object
      required:
        - method_name
      properties:
        method_name:
          type: string
          enum:
            - CARD
          example: CARD
        method_details:
          $ref: '#/components/schemas/TransactionCardMethodDetails'
    YapeTransactionPaymentMethod:
      title: Yape
      type: object
      required:
        - method_name
      properties:
        method_name:
          type: string
          enum:
            - YAPE
          example: YAPE
        method_details:
          $ref: '#/components/schemas/TransactionYapeMethodDetails'
    BankTransferTransactionPaymentMethod:
      title: Transferencia bancaria
      type: object
      required:
        - method_name
      properties:
        method_name:
          type: string
          enum:
            - BANK_TRANSFER
          example: BANK_TRANSFER
        method_details:
          $ref: '#/components/schemas/TransactionBankTransferMethodDetails'
    CuotealoTransactionPaymentMethod:
      title: Cuotealo
      type: object
      required:
        - method_name
      properties:
        method_name:
          type: string
          enum:
            - CUOTEALO
          example: CUOTEALO
        method_details:
          $ref: '#/components/schemas/TransactionCuotealoMethodDetails'
    PagoEfectivoTransactionPaymentMethod:
      title: PagoEfectivo
      type: object
      required:
        - method_name
      properties:
        method_name:
          type: string
          enum:
            - PAGOEFECTIVO
          example: PAGOEFECTIVO
        method_details:
          $ref: '#/components/schemas/TransactionPagoEfectivoMethodDetails'
    QrTransactionPaymentMethod:
      title: QR
      type: object
      required:
        - method_name
      properties:
        method_name:
          type: string
          enum:
            - QR
          example: QR
        method_details:
          $ref: '#/components/schemas/TransactionQrMethodDetails'
    TransactionExpirationDate:
      type: object
      properties:
        utc_time:
          type: string
          example: '2024-03-12T22:49:36.018Z'
        unix_time:
          type: integer
          example: 1711585037
    ProcessorResponse:
      type:
        - object
        - 'null'
      properties:
        authorization_code:
          type: string
          example: '055552'
        brand_transaction_id:
          type: string
          example: 100B
        date:
          type: string
          example: '2024-03-26 19:17:19.599715'
        qr_image:
          type: string
          example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...
        qr_id:
          type: string
          example: 6d5d1ffc79234991b5592b825d6ec097
        cip:
          type: string
          example: '1508405'
        cip_url:
          type: string
          example: >-
            https://pre1a.payment.pagoefectivo.pe/72217FA5-4580-4B16-A345-24F028F53356.html
        origin_account:
          type: string
          example: '055552'
        request_id:
          type: string
          example: '055552'
        operation_id:
          type: string
          example: '055552'
        credit_status:
          type: string
          example: APPROVED
        payment_date:
          type: string
          example: '2024-06-24T11:01:20-05:00'
        operationNumber:
          type: string
          example: '1057462'
        reverse_date:
          type: string
          example: 05-07-2024 20:34:19
        reverse_code:
          type: string
          example: T90261
        result_message:
          $ref: '#/components/schemas/ProcessorResultMessage'
    TransactionAuthenticationResult:
      type: object
      properties:
        version:
          type: string
          example: 2.1.0
        eci:
          type: string
          example: '05'
        vci:
          type: string
          example: TSYF
        ds_transaction_id:
          type: string
          example: ABC123
        3ds_transaction_id:
          type: string
          example: ABC123
    TransactionLifecycleEvent:
      type: object
      required:
        - state
        - date
      properties:
        state:
          type: string
          example: AUTORIZADO
        date:
          $ref: '#/components/schemas/TransactionLifecycleDate'
    ChargeStatusMessage:
      type: object
      properties:
        locale:
          type: string
          example: es_PE
        value:
          type: string
          example: Procesado correctamente
    TransactionCardMethodDetails:
      type: object
      properties:
        masked_pan:
          type: string
          example: 411111********1111
        brand:
          type: string
          example: VISA
        bin:
          type: string
          example: '411111'
        last_pan:
          type: string
          example: '9268'
        card_type:
          type: string
          example: DEBIT
        card_country:
          type: string
          example: PE
        issuer:
          type: string
          example: BANCO DE CREDITO DEL PERU - BCP
        installments:
          $ref: '#/components/schemas/CardInstallmentsResponse'
        redirect_url:
          type: string
          example: https://pay-me.com
        callback_url:
          type: string
          example: https://pay-me.com/callback
    TransactionYapeMethodDetails:
      type: object
      properties:
        phone:
          $ref: '#/components/schemas/PhoneWithCountryCode'
        masked_pan:
          type: string
          example: 411111********1111
        brand:
          type: string
          example: VISA
        bin:
          type: string
          example: '411111'
        last_pan:
          type: string
          example: '9268'
        card_type:
          type: string
          example: DEBIT
        card_country:
          type: string
          example: PE
        issuer:
          type: string
          example: BANCO DE CREDITO DEL PERU - BCP
        callback_url:
          type: string
          example: https://pay-me.com/callback
    TransactionBankTransferMethodDetails:
      type: object
      required:
        - redirect_url
      properties:
        redirect_url:
          type: string
          example: https://pay-me.com
        callback_url:
          type: string
          example: https://pay-me.com/callback
    TransactionCuotealoMethodDetails:
      type: object
      required:
        - redirect_url
      properties:
        redirect_url:
          type: string
          example: https://pay-me.com
        callback_url:
          type: string
          example: https://pay-me.com/callback
    TransactionPagoEfectivoMethodDetails:
      type: object
      properties:
        callback_url:
          type: string
          example: https://pay-me.com/callback
    TransactionQrMethodDetails:
      type: object
      properties:
        masked_pan:
          type: string
          example: 411111********1111
        brand:
          type: string
          example: VISA
        bin:
          type: string
          example: '411111'
        last_pan:
          type: string
          example: '9268'
        card_type:
          type: string
          example: DEBIT
        card_country:
          type: string
          example: PE
        issuer:
          type: string
          example: BANCO DE CREDITO DEL PERU - BCP
        callback_url:
          type: string
          example: https://pay-me.com/callback
    ProcessorResultMessage:
      type: object
      properties:
        code:
          type: string
          example: '00'
        description:
          type: string
          example: Approval and completed successfully
    CardInstallmentsResponse:
      type: object
      properties:
        plan:
          type: string
          example: NORMAL
        installment_number:
          type: string
          example: '2'
    PhoneWithCountryCode:
      type: object
      required:
        - country_code
        - subscriber
      properties:
        country_code:
          type: string
          example: '+51'
        subscriber:
          type: string
          example: '999835685'

````