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

# Get transaction

> Get a payment transaction, which represents a payment, refund or payout.



## OpenAPI

````yaml get /payment/transactions/{id}
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /payment/transactions/{id}:
    parameters: []
    get:
      tags:
        - Payment Transaction
      summary: Get transaction
      description: Get a payment transaction, which represents a payment, refund or payout.
      operationId: getPaymentTransaction
      parameters:
        - name: id
          in: path
          description: Transaction identifier
          required: true
          deprecated: false
          schema:
            type: string
          style: simple
          explode: false
      responses:
        '200':
          description: Transaction resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction-PaymentTransactionDetail'
            text/html:
              schema:
                $ref: '#/components/schemas/Transaction-PaymentTransactionDetail'
        '404':
          description: Resource not found
      deprecated: false
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X GET \
             /payment/transactions/{id} \
             --header "Authorization: Bearer <token>"
components:
  schemas:
    Transaction-PaymentTransactionDetail:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
          type: string
        customer:
          $ref: '#/components/schemas/Customer-PaymentTransactionDetail'
          readOnly: true
          description: The customer which belongs to the transaction.
        type:
          readOnly: true
          default: payment
          example: payment
          type: string
          enum:
            - payment
            - refund
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod-PaymentTransactionDetail'
          readOnly: true
          description: The payment method which was used for this transaction.
        gateway:
          readOnly: true
          description: |-
            The payment gateway which was used for this transaction.

            Possible values:
             * `paypal`: PayPal (supports "paypal")
             * `stripe`: Stripe (supports "card")
             * `testing`: Testing (supports all)
             * `go_cardless`: GoCardless (supports "sepa_debit")
             * `bank_transfer`: Bank Transfer (supports "bank_transfer")
             * `sepa_debit`: SEPA Credit and Debit with xml file (supports "sepa_debit")
             * `wallet`: Credit Balance from Wallet (supports "wallet")
          example: bank_transfer
        status:
          readOnly: true
          description: |-
            The status of the transaction.

            Possible values:
             * `new`: The transaction is new and not yet processed. A new transaction is created when a payment is initiated.
             * `authorized`: The transaction is authorized and can be captured.
             * `authorizing`: The transaction is authorizing. No actions can be performed on the transaction.
             * `waiting`: The transaction is waiting for a response from the payment provider, or a customer input. No actions can be performed on the transaction.
             * `offsite_authorization_required`: The transaction requires an offsite authorization, e.g. 3D Secure. The customer is informed about the required authorization and redirected to the payment provider.
             * `booked`: The transaction is captured and booked on the account.
             * `captured`: The transaction is captured and will be booked on the account.
             * `dispute`: The transaction is disputed.
             * `manual`: Legacy status. Do not use.
             * `canceled`: The transaction is canceled, e.g. by the customer during the payment process, or by the merchant.
             * `pending`: The transaction is pending, and will be processed soon by the payment provider.
             * `expired`: The transaction is expired, e.g. because the customer did not complete the payment process in time.
             * `processing`: The transaction is processing, e.g. because the payment provider is currently processing the payment.
             * `failed`: The transaction failed, e.g. because the payment provider could not process the payment.
             * `unknown`: The transaction status is unknown.
             * `refunded`: The transaction is fully refunded.
             * `payedout`: The transaction was a payout.
             * `partial_refunded`: The transaction is partially refunded.
             * `refund_failed`: The transaction refund failed.
          example: new
        description:
          readOnly: true
          description: The description of the transaction.
          example: 'Payment for invoice #123'
          type: string
        documentNumber:
          readOnly: true
          description: The internal reference number of the transaction.
          example: '123456789'
          type: string
        currencyCode:
          $ref: '#/components/schemas/CurrencyCode-PaymentTransactionDetail'
          readOnly: true
          description: The currency code of the transaction.
          example: EUR
        amount:
          readOnly: true
          description: The original amount which was requested.
          example: 500
          type: integer
        refundedAmount:
          readOnly: true
          description: The amount which was refunded.
          type: integer
        chargedAmount:
          readOnly: true
          description: The amount which was charged to the payment method.
          example: 500
          type: integer
        feeAmount:
          readOnly: true
          description: The amount of the transaction fee.
          example: 50
          type:
            - integer
            - 'null'
        createdAt:
          readOnly: true
          description: The date when the transaction was created.
          type: string
          format: date-time
        paidAt:
          readOnly: true
          description: The date when the transaction was charged.
          type:
            - string
            - 'null'
          format: date-time
        authorized:
          readOnly: true
          description: Describes if the transaction is authorized and can be captured.
          example: true
          type: boolean
        refundable:
          readOnly: true
          description: Describes if the transaction is refundable.
          example: true
          type: boolean
        processing:
          readOnly: true
          description: >-
            Describes if the transaction is currently processing and cannot
            perform any actions.
          example: true
          type: boolean
        captured:
          readOnly: true
          description: Describes if the transaction is sucessful processed.
          example: true
          type: boolean
        invoice:
          readOnly: true
          description: >-
            The invoice which belongs to the transaction. Can be null if the
            transaction is not related to an invoice.
          anyOf:
            - $ref: '#/components/schemas/Invoice-PaymentTransactionDetail'
            - type: 'null'
        referenceId:
          readOnly: true
          description: The reference id of the payment provider.
          example: ch_1J3AJ2
          type:
            - string
            - 'null'
    Customer-PaymentTransactionDetail:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 00000000-0000-0000-0000-000000000000
          type: string
        customerNumber:
          minLength: 2
          maxLength: 255
          example: CUSTOMER-000
          nullable: false
        timeZone:
          readOnly: true
          default: Europe/Berlin
          example: Europe/Berlin
          type: string
        firstName:
          minLength: 2
          maxLength: 255
          description: Can be empty if the customer is a company.
          example: John
          nullable: true
        lastName:
          minLength: 2
          maxLength: 255
          description: Can be empty if the customer is a company.
          example: Doe
          nullable: true
        currencyCode:
          description: >-
            Can be empty. In this case the default currency of the tenant is
            used.
          externalDocs:
            url: https://schema.org/priceCurrency
          example: EUR
          type: string
        companyName:
          minLength: 2
          maxLength: 255
          example: Acme Inc.
          type:
            - string
            - 'null'
        datevId:
          minLength: 2
          maxLength: 255
          description: The ID of the customer in DATEV
          example: '123456789'
          type:
            - string
            - 'null'
        status:
          default: STATUS_ACTIVE
          example: STATUS_ACTIVE
          enum:
            - STATUS_ACTIVE
            - STATUS_ARCHIVED
            - STATUS_SUSPENDED
    PaymentMethod-PaymentTransactionDetail:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
          description: Unique identifier of the payment method
          example: c1a2b3c4-d5e6-4f7a-8b9b-0c1d2e3f4a5b
        gatewayName:
          type: string
          enum:
            - wallet
            - sepa_debit
            - stripe
            - fake_provider
            - paypal
            - bank_transfer
            - go_cardless
            - testing
          description: The payment gateway used to process the payment method
        type:
          type:
            - string
            - 'null'
          enum:
            - sepa_debit
            - card
            - paypal
            - bank_transfer
            - wallet
            - fake_provider
            - null
          description: The type of the payment method
        default:
          type: boolean
          description: Whether this is the default payment method for the customer
          example: true
        status:
          default: active
          example: active
          type: string
          enum:
            - active
            - action_required
            - expired
            - revoked
            - gateway_unconfigured
          description: The current status of the payment method
        enabled:
          type: boolean
          description: Whether the payment method is enabled for use
          example: true
        name:
          type:
            - string
            - 'null'
          description: Display name of the payment method
          example: Visa (4242)
        creationDate:
          readOnly: true
          type: string
          format: date-time
          description: The date when the payment method was created
          example: '2024-01-15T10:30:00+00:00'
        expirationDate:
          type:
            - string
            - 'null'
          format: date-time
          description: The expiration date of the payment method, if applicable
          example: '2026-12-31T23:59:59+00:00'
        card:
          readOnly: true
          description: The card data of the payment method, if the type is "card"
          type: object
          properties:
            brand:
              type: string
              example: Visa
              description: The brand of the card
            last4:
              type: string
              example: '4242'
              description: The last 4 digits of the card
            expMonth:
              type: integer
              example: 12
              description: The expiration month of the card
            expYear:
              type: integer
              example: 2022
              description: The expiration year of the card
            cardHolder:
              type: string
              example: Max Mustermann
              description: The card holder name
        sepaDebit:
          readOnly: true
          description: >-
            The sepa mandate data of the payment method, if the type is
            "sepa_debit"
          type: object
          properties:
            iban:
              type: string
              example: DE8937*********3232
              description: The iban of the sepa mandate
            bic:
              type: string
              example: COBADEFFXXX
              description: The bic of the sepa mandate
            mandateReference:
              type: string
              example: MNDT-2021-123456
              description: The mandate reference of the sepa mandate
            signingDate:
              type: string
              example: '2021-01-01T00:00:00+00:00'
              description: The signing date of the sepa mandate
        paypal:
          readOnly: true
          description: The paypal data of the payment method, if the type is "paypal"
          type: object
          properties:
            email:
              type: string
              example: max@mustermann.de
              description: The email of the paypal account
            billingAgreementId:
              type: string
              example: I-1J5gqz2eZvKYlo2C2X2X2X2X
              description: The billing agreement id of the paypal account
    CurrencyCode-PaymentTransactionDetail:
      type: string
      description: ISO 4217 currency code.
      example: EUR
    Invoice-PaymentTransactionDetail:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The unique identifier of the invoice.
          example: 00000000-0000-0000-0000-000000000000
          type: string
          format: uuid
        customer:
          $ref: '#/components/schemas/Customer-PaymentTransactionDetail'
          description: The customer of the invoice.
        paymentMethod:
          description: >-
            The payment method which should be used to fullfill the payment of
            the invoice.
          anyOf:
            - $ref: '#/components/schemas/PaymentMethod-PaymentTransactionDetail'
            - type: 'null'
        type:
          description: The type of the invoice.
          example: TYPE_INVOICE
          enum:
            - TYPE_INVOICE
            - TYPE_CREDIT
            - TYPE_REFUND
            - TYPE_REMINDER
            - TYPE_CANCEL
            - TYPE_DUNNING
        currencyCode:
          description: >-
            The currency code of the invoice. If multiple currency codes will be
            used in the positions, they will be converted to that base currency.
          example: EUR
          type: string
        number:
          readOnly: true
          description: >-
            The document id of the invoice. This will be generated, when the
            invoice will be finalized.
          example: RE-0000000001
          type: string
        status:
          readOnly: true
          type: string
          enum:
            - STATUS_DRAFT
            - STATUS_PAID
            - STATUS_CANCELLED
            - STATUS_CLOSED
            - STATUS_REFUNDED
            - STATUS_REMINDED
            - STATUS_UNPAID
            - STATUS_NEW
            - STATUS_FINALIZING
        finalizationDate:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        dueDate:
          type:
            - string
            - 'null'
          format: date-time
        dunningLevel:
          readOnly: true
          type: integer
        dunningStatus:
          readOnly: true
          default: none
          example: none
          type: string
          enum:
            - reminder
            - dunning
            - none
        payDate:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        invoiceAddress:
          readOnly: true
          description: The invoice address of the invoice.
          nullable: true
        internalNote:
          description: The notice of the invoice.
          deprecated: true
          example: This invoice is with a special discount.
          type:
            - string
            - 'null'
        netAmount:
          $ref: '#/components/schemas/MoneyEmbedded-PaymentTransactionDetail'
          readOnly: true
          description: The net amount of the invoice.
        grossAmount:
          $ref: '#/components/schemas/MoneyEmbedded-PaymentTransactionDetail'
          readOnly: true
        taxAmount:
          $ref: '#/components/schemas/MoneyEmbedded-PaymentTransactionDetail'
          readOnly: true
        customFields:
          additionalProperties:
            type: string
          type:
            - object
            - 'null'
          example:
            field1: value1
            field2: value2
          description: >-
            Custom fields for the entity. The keys are the field names and the
            values are the field values. They need to be configured under
            \"/custom-fields\" in the API documentation. The input is validated
            against the configuration. For more details see [Custom Fields
            Guide](/guide/tenant/custom-fields)
        unpaidAmount:
          $ref: '#/components/schemas/Money-PaymentTransactionDetail'
          readOnly: true
    MoneyEmbedded-PaymentTransactionDetail:
      type: object
      description: ''
      deprecated: false
    Money-PaymentTransactionDetail:
      type: object
      description: ''
      deprecated: false
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````