> ## 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.

# Create Link

> Create Link



## OpenAPI

````yaml post /pay-link
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:
  /pay-link:
    post:
      tags:
        - Payment Collection Methods
      summary: Create Payment Link
      description: Create Payment Link
      operationId: createPaymentLink
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: string
                  example: '4.55'
                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: 22111fdz
                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:
              Create Payment Link:
                value:
                  amount: '4.55'
                  merchant_key: '{{merchant_key}}'
                  order_id: 22111fdz
                  invoice_number: '345'
      responses:
        '201':
          description: Create Link
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Connection:
              schema:
                type: string
                example: keep-alive
            Content-Length:
              schema:
                type: string
                example: '219'
            Date:
              schema:
                type: string
                example: Thu, 08 Aug 2024 18:41:02 GMT
            ETag:
              schema:
                type: string
                example: W/"db-bXu3eOWR5CrQu8qUg+QpyajKPrA"
            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: 22111fdz
                      payment_link:
                        type: string
                        example: >-
                          https://testapi.fractalpay.com/authcheck-paymentlink/u6j3garacoj
                      sales_id:
                        type: string
                        example: txn_c2e0adab55
                  message:
                    type: string
                    example: Quick Pay Order created successfully.
                  result:
                    type: boolean
                    example: true
              examples:
                Create Link:
                  value:
                    data:
                      order_id: 22111fdz
                      payment_link: >-
                        https://testapi.fractalpay.com/authcheck-paymentlink/u6j3garacoj
                      sales_id: txn_c2e0adab55
                    message: Quick Pay Order created successfully.
                    result: true
      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.

````