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

# Create payment request



## OpenAPI

````yaml /openapi/merchant.openapi.json post /merchant/payment-request
openapi: 3.0.3
info:
  title: Merchant API
  version: 1.0.0
  description: OpenAPI spec for Merchant API
servers:
  - url: https://staging-api.yourflexpay.com/v2
    description: Staging
  - url: https://sandbox-api.yourflexpay.com/v2
    description: Sandbox
  - url: https://api.yourflexpay.com/v2
    description: Live
security: []
tags:
  - name: Merchant QR
  - name: Merchant Payment Request
paths:
  /merchant/payment-request:
    post:
      tags:
        - Merchant Payment Request
      summary: Create payment request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OneTapRequest'
      responses:
        '200':
          description: Created payment request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentRequest'
      security:
        - ClientIdHeader: []
          ApiKeyHeader: []
          MerchantLocationHeader: []
components:
  schemas:
    OneTapRequest:
      allOf:
        - $ref: '#/components/schemas/TransactionDto'
        - type: object
          properties:
            duration:
              type: integer
              minimum: 2
            pin:
              type: string
            payer:
              type: string
              description: Paytag identifier used by PayTagPipe
    PaymentRequest:
      type: object
      required:
        - ID
        - Amount
        - Status
        - Type
        - CreatedAt
        - UpdatedAt
      properties:
        ID:
          type: integer
        PayTag:
          $ref: '#/components/schemas/PayTagLite'
        Payer:
          $ref: '#/components/schemas/PayTagLite'
        Amount:
          type: number
        Reference:
          type: string
        Description:
          type: string
        Status:
          $ref: '#/components/schemas/PaymentRequestStatus'
        Type:
          $ref: '#/components/schemas/TransactionType'
        ExpiresAt:
          type: string
          format: date-time
        CreatedAt:
          type: string
          format: date-time
        UpdatedAt:
          type: string
          format: date-time
    TransactionDto:
      type: object
      required:
        - amount
      properties:
        amount:
          type: number
          maximum: 999999999
        reference:
          type: string
          maxLength: 100
        comment:
          type: string
          maxLength: 250
        currency:
          $ref: '#/components/schemas/WalletCurrency'
        metadata:
          type: object
          additionalProperties: true
    PayTagLite:
      type: object
      properties:
        ID:
          type: integer
        Tag:
          type: string
        Name:
          type: string
      additionalProperties: true
    PaymentRequestStatus:
      type: string
      enum:
        - Pending
        - Accepted
        - Declined
        - Cancelled
        - Expired
    TransactionType:
      type: string
      enum:
        - C2C
        - C2P
        - C2M
        - Top Up
        - Adjustment
        - Reversal
        - Withdrawal
        - Bank Transfer
        - FirestoreTransaction
        - Wallet Settlement
        - Reward Redemption
        - Reward
        - Bulk Transfer
        - Exchange
        - Partner Terminal
        - Partner Gateway
        - Card Top Up
        - Vas
        - Airtime Purchase
        - Mobile Data Purchase
        - Terminal Settlement
        - Virtual Account Transfer
        - QR Virtual Account Transfer
        - Idaas Outward Transfer
        - Idaas Inward Transfer
    WalletCurrency:
      type: string
      enum:
        - NGN
        - FP
  securitySchemes:
    ClientIdHeader:
      type: apiKey
      in: header
      name: x-client-id
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
    MerchantLocationHeader:
      type: apiKey
      in: header
      name: x-location

````