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

# Payment Request Customer

> Payment Request Customer



## OpenAPI

````yaml post /requests/{customerId}
openapi: 3.0.3
info:
  title: Fractal
  version: 1.0.0
  contact: {}
servers:
  - url: https://testapi.fractalpay.com/api/v1
    description: Sandbox
  - url: https://api.fractalpay.com/api/v1
    description: Production
security: []
tags:
  - name: Merchant Onboarding
  - name: Payment Collection Methods
  - name: Requests
  - name: Preauthorizations
  - name: Customers
  - name: Charging Customer
  - name: Transactions
paths:
  /requests/{customerId}:
    parameters:
      - name: customerId
        in: path
        required: true
        description: >-
          The customer's unique ID. Returned in the `customer_id` field of the
          Create Customer (`POST /customers/add`) response. To retrieve a list
          of all customers and their IDs, use the Get Customers (`GET
          /customers`) endpoint.
        schema:
          type: string
    post:
      tags:
        - Payment Collection Methods
        - Requests
      summary: Payment Request Customer
      description: Payment Request Customer
      operationId: paymentRequestCustomer
      parameters:
        - name: api_key
          in: header
          schema:
            type: string
            example: 8af9a5a0e6338fbafd8d2fa7a688fd16363cc865c6e6ede3002d041c2613cb99
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: string
                  example: '4.00'
                isRequestCard:
                  type: boolean
                  example: true
                merchant_key:
                  type: string
                  description: >-
                    The merchant's unique key. Returned in the `merchant_key`
                    field of the get merchants by client call.
                  example: '{{merchant_key}}'
                order_id:
                  type: string
                  example: '512345'
                preauth:
                  type: boolean
                  example: false
                invoice_number:
                  type: string
                  example: '345'
                allow_card:
                  type: boolean
                  default: true
                  example: true
                  description: >-
                    Allow card as a payment method. At least one of `allow_card`
                    or `allow_ach` must be `true` — setting both to `false` will
                    result in an error.
                allow_ach:
                  type: boolean
                  default: true
                  example: true
                  description: >-
                    Allow ACH as a payment method. At least one of `allow_card`
                    or `allow_ach` must be `true` — setting both to `false` will
                    result in an error.
              required:
                - order_id
                - amount
                - merchant_key
            examples:
              Authorization Request Customer:
                value:
                  amount: '4.00'
                  merchant_key: '{{merchant_key}}'
                  order_id: '54514'
                  preauth: true
              Payment Request Customer:
                value:
                  amount: '4.00'
                  merchant_key: '{{merchant_key}}'
                  order_id: '512345'
                  preauth: false
                  invoice_number: '345'
              Request Card With Customer:
                value:
                  isRequestCard: true
                  merchant_key: '{{merchant_key}}'
      responses:
        '200':
          description: Authorization Request Customer / Request Card With Customer
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Connection:
              schema:
                type: string
                example: keep-alive
            Content-Length:
              schema:
                type: string
                example: '58'
            Date:
              schema:
                type: string
                example: Wed, 21 Aug 2024 16:09:29 GMT
            ETag:
              schema:
                type: string
                example: W/"3a-WOay6XweLLnkuAfHML9DiSmFzMc"
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
            X-Powered-By:
              schema:
                type: string
                example: Express
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      order_id:
                        type: string
                        example: '54514'
                      pay_link:
                        type: string
                        example: >-
                          http://localhost:8082/pre-auth/bb40a9028ef7e65521bb4d21ee491437?amount=4.00&order_id=54514
                      sales_id:
                        type: string
                        example: ''
                  message:
                    type: string
                    example: Text request has been sent
                  result:
                    type: boolean
                    example: true
              examples:
                Authorization Request Customer:
                  value:
                    data:
                      order_id: '54514'
                      pay_link: >-
                        http://localhost:8082/pre-auth/bb40a9028ef7e65521bb4d21ee491437?amount=4.00&order_id=54514
                      sales_id: ''
                    message: Text request has been sent
                Request Card With Customer:
                  value:
                    message: Card request sent successfully
                    result: true
        '201':
          description: Payment Request Customer
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Connection:
              schema:
                type: string
                example: keep-alive
            Content-Length:
              schema:
                type: string
                example: '192'
            Date:
              schema:
                type: string
                example: Wed, 21 Aug 2024 16:04:34 GMT
            ETag:
              schema:
                type: string
                example: W/"c0-b2gGN11PBu5rPGm79OjalhWeZq4"
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
            X-Powered-By:
              schema:
                type: string
                example: Express
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      order_id:
                        type: string
                        example: '512345'
                      qr_code_link:
                        type: string
                        example: >-
                          https://testapi.fractalpay.com/authcheck-paymentlink/842gd6vkh8g
                      sales_id:
                        type: string
                        example: txn_c9d4899edb
                  message:
                    type: string
                    example: Text request has been sent
              examples:
                Payment Request Customer:
                  value:
                    data:
                      order_id: '512345'
                      qr_code_link: >-
                        https://testapi.fractalpay.com/authcheck-paymentlink/842gd6vkh8g
                      sales_id: txn_c9d4899edb
                    message: Text request has been sent
      security:
        - basicAuth: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: |-
        Use your Fractal API credentials.

        Username = Client ID
        Password = Secret Key

        Sandbox credentials can be generated from the Test Portal.

````