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

# Create payin order (deposit)

> Create a payin order (deposit). This is the opposite of payout (withdraw). This endpoint supports two authentication methods - either use client credentials headers OR bearer token.



## OpenAPI

````yaml /api-reference/openapi.json post /payin/create-order
openapi: 3.0.3
info:
  description: >-
    Comprehensive financial APIs designed to streamline your business operations
    and enhance your customer experience.


    This documentation covers the Pay In APIs.
  license:
    name: MIT
  title: FinFlex API Reference
  version: 1.0.0
servers:
  - url: https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com
security:
  - bearerAuth: []
tags:
  - description: Pay-in operations
    name: Pay In
  - description: Health check endpoints
    name: Health
paths:
  /payin/create-order:
    post:
      tags:
        - Pay In
      summary: Create payin order (deposit)
      description: >-
        Create a payin order (deposit). This is the opposite of payout
        (withdraw). This endpoint supports two authentication methods - either
        use client credentials headers OR bearer token.
      parameters:
        - description: Finflex client ID (starts with finflex_test_ or finflex_live_)
          example: finflex_test_6868706820
          in: header
          name: x-client-id
          required: false
          schema:
            type: string
        - description: Finflex client secret
          example: finflex_test_be3798f8-deed-4215-97b4-556049549670
          in: header
          name: x-client-secret
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                amount:
                  example: 10
                  type: number
                callback_url:
                  example: https://google.com
                  type: string
                client_id:
                  example: finflex_test_6868706820
                  type: string
                customer_details:
                  properties:
                    email:
                      example: donation@gmail.com
                      type: string
                    mobile:
                      example: '9040660463'
                      type: string
                    name:
                      example: Testing
                      type: string
                  required:
                    - email
                    - mobile
                    - name
                  type: object
                order_id:
                  example: 321sdf
                  type: string
              required:
                - client_id
                - amount
                - order_id
                - callback_url
                - customer_details
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      amount:
                        example: 10
                        type: number
                      client_id:
                        example: finflex_test_6868706820
                        type: string
                      created_at:
                        example: '2024-07-04T10:30:00Z'
                        format: date-time
                        type: string
                      order_id:
                        example: 321sdf
                        type: string
                      payment_url:
                        example: https://payment.smebank.com/pay/abc123
                        type: string
                      status:
                        example: pending
                        type: string
                      transaction_id:
                        example: txn_987654321
                        type: string
                    type: object
                  message:
                    example: Payin order created successfully
                    type: string
                  success:
                    example: true
                    type: boolean
                type: object
          description: Payin order created successfully
        '401':
          content:
            application/json:
              schema:
                properties:
                  message:
                    example: >-
                      Authentication failed - please provide either valid client
                      credentials or a valid Bearer token
                    type: string
                  status:
                    example: false
                    type: boolean
                type: object
          description: Authentication failed
      servers:
        - url: https://48x2gpzu9b.execute-api.ap-south-1.amazonaws.com/v1
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````