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

# Create transaction pay mini app

> Creates a new transaction pay mini app that can be used to collect payments through a mini app

<Info>
  ### Read more about this API here: [Make agents prompt transactions](/docs/make-agents-prompt-transactions)
</Info>

## Node.js SDK

🔗 **SDK Method:** [createTransactionPayFrame](/nodejs-sdk/agent-apis/createTransactionPayFrame)

Use this API endpoint with the Neynar Node.js SDK for typed responses and better developer experience.


## OpenAPI

````yaml post /v2/farcaster/frame/transaction/pay/
openapi: 3.0.4
info:
  contact:
    email: team@neynar.com
    name: Neynar
    url: https://neynar.com/
  description: >-
    The Neynar API allows you to interact with the Farcaster protocol among
    other things. See the [Neynar docs](https://docs.neynar.com/reference) for
    more details.
  title: Neynar API
  version: 3.173.0
servers:
  - url: https://api.neynar.com
security:
  - ApiKeyAuth: []
tags:
  - description: Operations related to user
    externalDocs:
      description: More info about user
      url: https://docs.neynar.com/reference/user-operations
    name: User
  - description: Operations related to signer
    externalDocs:
      description: More info about signer
      url: https://docs.neynar.com/reference/signer-operations
    name: Signer
  - description: Operations related to cast
    externalDocs:
      description: More info about cast
      url: https://docs.neynar.com/reference/cast-operations
    name: Cast
  - description: Operations related to feed
    externalDocs:
      description: More info about feed
      url: https://docs.neynar.com/reference/feed-operations
    name: Feed
  - description: Operations related to reaction
    externalDocs:
      description: More info about reaction
      url: https://docs.neynar.com/reference/reaction-operations
    name: Reaction
  - description: Operations related to notifications
    externalDocs:
      description: More info about notifications
      url: https://docs.neynar.com/reference/notifications-operations
    name: Notifications
  - description: Operations related to channels
    externalDocs:
      description: More info about channels
      url: https://docs.neynar.com/reference/channel-operations
    name: Channel
  - description: Operations related to follows
    externalDocs:
      description: More info about follows
      url: https://docs.neynar.com/reference/follows-operations
    name: Follows
  - description: Operations related to storage
    externalDocs:
      description: More info about storage
      url: https://docs.neynar.com/reference/storage-operations
    name: Storage
  - description: Operations related to mini apps
    name: Frame
  - description: Operations for building AI agents
    name: Agents
  - description: Operations related to fname
    name: fname
  - description: Operations related to a webhook
    name: Webhook
  - description: >-
      Securely communicate and perform actions on behalf of users across
      different apps
    externalDocs:
      description: More info about farcaster actions
      url: https://docs.neynar.com/docs/farcaster-actions-spec
    name: Action
  - description: Operations related to a subscriptions
    name: Subscribers
  - description: Operations related to a mute
    name: Mute
  - description: Operations related to a block
    name: Block
  - description: Operations related to a ban
    name: Ban
  - description: Operations related to onchain data
    name: Onchain
  - description: Operations related to login
    name: Login
  - description: Operations related to retrieving metrics
    name: Metrics
  - description: Operations related to mini app host notifications
    externalDocs:
      description: More info about mini app host notifications
      url: https://docs.neynar.com/docs/app-host-notifications
    name: App Host
paths:
  /v2/farcaster/frame/transaction/pay/:
    post:
      tags:
        - Agents
      summary: Create transaction pay mini app
      description: >-
        Creates a new transaction pay mini app that can be used to collect
        payments through a mini app
      operationId: create-transaction-pay-frame
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FramePayTransactionReqBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionFrameResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Unauthorized
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Server Error
      externalDocs:
        url: https://docs.neynar.com/reference/create-transaction-pay-frame
components:
  schemas:
    FramePayTransactionReqBody:
      properties:
        config:
          $ref: '#/components/schemas/TransactionFrameConfig'
        idem:
          $ref: '#/components/schemas/Idem'
        transaction:
          properties:
            to:
              $ref: '#/components/schemas/TransactionFrameDestination'
          required:
            - to
          type: object
      required:
        - transaction
        - config
      title: FramePayTransactionReqBody
      type: object
    TransactionFrameResponse:
      properties:
        transaction_frame:
          $ref: '#/components/schemas/TransactionFrame'
      required:
        - transaction_frame
      title: TransactionFrameResponse
      type: object
    ErrorRes:
      description: Details for the error response
      properties:
        code:
          type: string
        message:
          type: string
        property:
          type: string
        status:
          format: int32
          type: integer
      required:
        - message
      title: ErrorRes
      type: object
    TransactionFrameConfig:
      properties:
        action:
          $ref: '#/components/schemas/TransactionFrameAction'
        allowlist_fids:
          description: >-
            Optional list of FIDs that are allowed to use this transaction mini
            app
          items:
            $ref: '#/components/schemas/Fid'
          type: array
        line_items:
          description: List of items included in the transaction
          items:
            $ref: '#/components/schemas/TransactionFrameLineItem'
          minItems: 1
          type: array
      required:
        - line_items
      title: TransactionFrameConfig
      type: object
    Idem:
      description: >-
        An Idempotency key is a unique identifier for the request.

        **Note:** 

        1) This is used to prevent duplicate requests. Use the same idem key on
        retry attempts.

        2) This should be a unique identifier for each request.

        3) Recommended format is a 16-character string generated by the
        developer at the time of making this request.
      title: Idem
      type: string
    TransactionFrameDestination:
      properties:
        address:
          $ref: '#/components/schemas/EthAddress'
        amount:
          description: Amount to send (must be greater than 0)
          example: 0.01
          minimum: 1.e-8
          type: number
        network:
          $ref: '#/components/schemas/Network'
        token_contract_address:
          description: >-
            Token contract address for the payment (e.g.
            0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 is USDC on Base)
          example: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
          pattern: ^0x[a-fA-F0-9]{40}$
          type: string
      required:
        - address
        - network
        - token_contract_address
        - amount
      title: TransactionFrameDestination
      type: object
    TransactionFrame:
      discriminator:
        mapping:
          pay:
            $ref: '#/components/schemas/TransactionFramePay'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/TransactionFramePay'
      title: TransactionFrame
      type: object
    TransactionFrameAction:
      description: Action button for primary CTA on the transaction mini app
      properties:
        button_color:
          description: Custom button color for action button
          example: '#000000'
          type: string
        text:
          description: Custom text for action button
          example: Pay
          type: string
        text_color:
          description: Custom text color for action button
          example: '#FFFFFF'
          type: string
      title: TransactionFrameAction
      type: object
    Fid:
      description: The unique identifier of a farcaster user or app (unsigned integer)
      example: 3
      format: int32
      minimum: 0
      title: Fid
      type: integer
    TransactionFrameLineItem:
      properties:
        description:
          description: Description of the line item in transaction
          example: Payment for goods
          type: string
        image:
          description: Optional image URL for the line item in transaction
          example: https://i.imgur.com/ovGo3sz.png
          type: string
        name:
          description: Name of the line item in transaction
          example: Payment
          type: string
      required:
        - name
        - description
      title: TransactionFrameLineItem
      type: object
    EthAddress:
      description: Ethereum address
      example: '0x5a927ac639636e534b678e81768ca19e2c6280b7'
      pattern: ^0x[a-fA-F0-9]{40}$
      title: EthAddress
      type: string
    Network:
      description: A blockchain network e.g. "ethereum", "optimism", "base", "arbitrum"
      enum:
        - ethereum
        - optimism
        - base
        - arbitrum
      title: Network
      type: string
    TransactionFramePay:
      properties:
        config:
          $ref: '#/components/schemas/TransactionFrameConfig'
        id:
          description: Unique identifier for the transaction mini app
          type: string
        status:
          $ref: '#/components/schemas/TransactionFrameStatus'
        transaction:
          properties:
            to:
              $ref: '#/components/schemas/TransactionFrameDestination'
          required:
            - to
          type: object
        type:
          $ref: '#/components/schemas/TransactionFrameType'
        url:
          description: URL that can be used to access the transaction mini app
          format: uri
          type: string
      required:
        - id
        - url
        - type
        - config
        - status
        - transaction
      title: TransactionFramePay
      type: object
    TransactionFrameStatus:
      enum:
        - created
        - completed
      title: TransactionFrameStatus
      type: string
    TransactionFrameType:
      description: Type of transaction mini app
      enum:
        - pay
      title: TransactionFrameType
      type: string
  securitySchemes:
    ApiKeyAuth:
      description: API key to authorize requests
      in: header
      name: x-api-key
      type: apiKey
      x-default: NEYNAR_API_DOCS

````