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

# Get transaction

> Get a transaction by ID



## OpenAPI

````yaml swagger.mintlify.yaml get /api/transaction/{id}
openapi: 3.0.1
info:
  title: 3P API
  description: A unified payment processing API that aggregates multiple payment providers
  contact: {}
  version: '1.0'
servers:
  - url: https://api.use3p.com
security: []
paths:
  /api/transaction/{id}:
    get:
      tags:
        - transactions
      summary: Get transaction
      description: Get a transaction by ID
      parameters:
        - name: id
          in: path
          description: Transaction ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Transaction retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ent.Transaction'
      security:
        - BearerAuth: []
components:
  schemas:
    ent.Transaction:
      type: object
      properties:
        amount:
          type: number
          description: Amount holds the value of the "amount" field.
        created_at:
          type: string
          description: CreatedAt holds the value of the "created_at" field.
        id:
          type: string
          description: ID of the ent.
        meta:
          $ref: '#/components/schemas/schema.TransactionMeta'
        provider:
          $ref: '#/components/schemas/transaction.Provider'
        reference:
          type: string
          description: Reference holds the value of the "reference" field.
        status:
          $ref: '#/components/schemas/transaction.Status'
        type:
          $ref: '#/components/schemas/transaction.Type'
        updated_at:
          type: string
          description: UpdatedAt holds the value of the "updated_at" field.
    schema.TransactionMeta:
      type: object
      properties:
        email:
          type: string
        name:
          type: string
        others:
          type: object
          additionalProperties:
            type: object
        phone:
          type: string
        product:
          type: string
        product_description:
          type: string
        redirect_url:
          type: string
    transaction.Provider:
      type: string
      enum:
        - flutterwave
        - paystack
      x-enum-varnames:
        - ProviderFlutterwave
        - ProviderPaystack
    transaction.Status:
      type: string
      enum:
        - pending
        - successful
        - failed
      x-enum-varnames:
        - StatusPending
        - StatusSuccessful
        - StatusFailed
    transaction.Type:
      type: string
      enum:
        - debit
        - credit
      x-enum-varnames:
        - TypeDebit
        - TypeCredit
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````