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

# Initialize transaction

> Initialize a new payment transaction



## OpenAPI

````yaml swagger.mintlify.yaml post /api/transaction/initialize
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/initialize:
    post:
      tags:
        - transactions
      summary: Initialize transaction
      description: Initialize a new payment transaction
      requestBody:
        description: Transaction initialization data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dto.InitializeTransactionRequest'
        required: true
      responses:
        '201':
          description: Transaction initialized successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.InitializeTransactionResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    dto.InitializeTransactionRequest:
      type: object
      properties:
        amount:
          type: number
        currency:
          type: string
        email:
          type: string
        name:
          type: string
        phone:
          type: string
        product:
          type: string
        product_description:
          type: string
        provider:
          $ref: '#/components/schemas/transaction.Provider'
        redirect_url:
          type: string
        reference:
          type: string
    types.InitializeTransactionResponse:
      type: object
      properties:
        reference:
          type: string
        url:
          type: string
    transaction.Provider:
      type: string
      enum:
        - flutterwave
        - paystack
      x-enum-varnames:
        - ProviderFlutterwave
        - ProviderPaystack
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````