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

# Create Payment Intent



## OpenAPI

````yaml POST /api/v1/payment/sandbox/intent
openapi: 3.0.1
info:
  title: FenanPay API Reference
  version: v0
servers:
  - url: https://api.fenanpay.com
    description: FenanAPI baseURL
security:
  - ApiKeyAuth: []
paths:
  /api/v1/payment/sandbox/intent:
    post:
      tags:
        - payment-intent-controller
      operationId: testIntent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentIntentRequestDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponseObject'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidationErrorResponse'
                  - $ref: '#/components/schemas/BaseErrorResponse'
                  - type: string
                  - $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PaymentIntentRequestDto:
      required:
        - commissionPaidByCustomer
        - currency
        - expireIn
        - methods
        - paymentIntentUniqueId
        - returnUrl
      type: object
      properties:
        amount:
          type: number
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentItem'
        currency:
          type: string
          enum:
            - USD
            - ETB
        paymentIntentUniqueId:
          type: string
        methods:
          type: array
          items:
            type: string
            enum:
              - TELE_BIRR
              - CBE
              - ETS_SWITCH
              - M_PESA
              - E_BIRR
              - TELE_BIRR_USSD
        splitPayment:
          type: array
          items:
            $ref: '#/components/schemas/SplitPaymentDetails'
        returnUrl:
          pattern: >-
            ^(https?):\/\/(?!-)(?:[a-zA-Z0-9-]{1,63}\.?)*(?::\d{1,5})?(?:\/(?:[^\s]*)?)?$
          type: string
        expireIn:
          minimum: 30
          type: integer
          format: int64
        callbackUrl:
          pattern: >-
            ^(https?):\/\/(?!-)(?:[a-zA-Z0-9-]{1,63}\.?)*(?::\d{1,5})?(?:\/(?:[^\s]*)?)?$
          type: string
        commissionPaidByCustomer:
          type: boolean
        customerInfo:
          $ref: '#/components/schemas/CustomeInfoRequestDto'
    GenericResponseObject:
      type: object
      properties:
        status:
          type: integer
          format: int32
        message:
          type: string
        content:
          type: object
    ValidationErrorResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
        message:
          type: string
        validationErrors:
          type: object
          additionalProperties:
            type: string
    BaseErrorResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
        message:
          type: string
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
        message:
          type: string
    PaymentItem:
      required:
        - name
        - quantity
        - type
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        image:
          type: string
        quantity:
          minimum: 1
          type: integer
          format: int32
        type:
          type: string
          enum:
            - SERVICE
            - DIGITAL_PRODUCT
            - PHYSICAL_PRODUCT
        price:
          type: number
    SplitPaymentDetails:
      required:
        - amount
        - bank
        - creditAccount
        - splitType
      type: object
      properties:
        amount:
          type: number
        bank:
          type: string
        splitType:
          type: string
          enum:
            - PERCENTAGE
            - NUMBER
        creditAccount:
          type: string
    CustomeInfoRequestDto:
      required:
        - phone
      type: object
      properties:
        email:
          type: string
        phone:
          type: string
        name:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apiKey

````