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

# Create Transaction Request

> Create Transfer Request.



## OpenAPI

````yaml POST /tx/createTransferRequest
openapi: 3.0.1
info:
  title: Stable Pay API
  description: The API for the Stable Pay Gateway
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.stablepay.ai
security:
  - bearerAuth: []
tags:
  - name: Transactions
    description: Operations related to payment transactions
  - name: Payouts
    description: Operations related to payouts
  - name: Identity
    description: Operations related to Stablepay ID management
  - name: Mpesa
    description: Operations related to Mpesa payouts
  - name: ForeignExchange
    description: Operations related to currency conversion
  - name: MoMo
    description: Operations related to Mobile Money
  - name: resolve
    description: Operations related to account resolution
  - name: validate
    description: Operations related to account validation
paths:
  /tx/createTransferRequest:
    post:
      tags:
        - Transactions
      summary: Create Transfer Request
      description: Create Transfer Request.
      operationId: createTransferRequest
      requestBody:
        description: Create a new Transfer on Stablepay.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TxRequest'
        required: true
      responses:
        '200':
          description: Transfer request created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TxRequestResponse'
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TxRequest:
      type: object
      required:
        - recipient
        - amount
        - reference
        - issuer
        - acquirerMerchantName
        - merchantID
        - description
        - terminalType
        - successUrl
        - failedUrl
        - webhookUrl
      properties:
        recipient:
          type: string
          description: The recipient Stablepay wallet address.
          minLength: 1
        amount:
          type: number
          description: The total transaction amount in ZAR.
          minimum: 0.01
          multipleOf: 0.01
        currency:
          type: string
          description: 'Available options: USDC, USDT. Default = USDC'
          enum:
            - USDC
            - USDT
            - ZAR
        issuer:
          type: string
          description: 'Available options: Binance, Bybit, Valr'
          enum:
            - Valr
            - Binance
            - Bybit
        acquirerMerchantName:
          type: string
          description: 'Available options: Paystack.'
          minLength: 1
        reference:
          type: string
          description: A unique transaction reference.
          minLength: 11
        customReference:
          type: string
          description: Optional merchant acquirer custom reference e.g RF-25364.
          maxLength: 100
        merchantCategoryCode:
          type: string
          description: Merchant category code.
          maxLength: 10
        merchantID:
          type: string
          description: SubMerchantID for Binance. MerchantID for Bybit. PayID for Valr.
          minLength: 1
        goodsType:
          type: string
          description: 'Available options: 01 (Tangible Goods), 02 (Virtual Goods).'
          enum:
            - '01'
            - '02'
        description:
          type: string
          description: 'Description of goods. Maximum length: 100.'
          maxLength: 100
        terminalType:
          type: string
          description: 'Available options: APP, WEB'
          enum:
            - APP
            - WEB
        successUrl:
          type: string
          description: URL to return after successful payment (max 256 characters)
          format: uri
          maxLength: 256
        failedUrl:
          type: string
          description: URL to return after failed payment (max 256 characters)
          format: uri
          maxLength: 256
        webhookUrl:
          type: string
          description: >-
            API URL to call when order is successful or failed (max 256
            characters)
          format: uri
          maxLength: 256
    TxRequestResponse:
      type: object
      required:
        - link
      properties:
        link:
          type: string
          description: Issuer Deeplink to facilitate the transaction.
          format: uri
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Human-readable error message
        details:
          type: object
          description: Additional error details
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        API key authentication using Bearer scheme. 
         Format: Bearer {STA_xxxx}

````