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

# Create Payment Authorisation

> Create a new payment authorisation request

Call this endpoint to create a payment authorisation request and generate a unique `uuid` that you then insert into the `id` parameter
of the Klyme HTML element.

If everything is set up correctly as per the [quickstart](/quickstart), you should see something similar to the following.

![klyme-widget-flow-loaded](https://storage.googleapis.com/klyme-misc/klyme-widget-flow-loaded.png)


## OpenAPI

````yaml POST /payment-auth-requests
openapi: 3.1.0
info:
  title: OpenAPI Klyme
  description: The Klyme API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-test.klyme.io/api/v1
  - url: https://api.klyme.io/api/v1
security:
  - basicAuth: []
paths:
  /payment-auth-requests:
    post:
      description: Create a new payment authorisation request
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Payment'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UUID'
components:
  schemas:
    Payment:
      required:
        - merchantUuid
        - amount
        - currency
        - redirectUrl
      type: object
      properties:
        merchantUuid:
          type: string
        amount:
          type: number
          format: double
          example: 10.99
        currency:
          type: string
          enum:
            - EUR
            - GBP
        redirectUrl:
          type: string
          maxLength: 256
          description: >-
            Where the user will be redirected to once the payment has been
            authorised.
        bankId:
          type: string
          maxLength: 64
        reference:
          type: string
          maxLength: 36
        email:
          type: string
          format: email
          maxLength: 256
        firstName:
          type: string
          maxLength: 64
        surname:
          type: string
          maxLength: 64
        mobile:
          type: number
          maxLength: 12
        phone:
          type: number
          maxLength: 12
        customerId:
          type: string
          maxLength: 32
        title:
          type: string
          maxLength: 32
        dob:
          type: string
          format: date
        gender:
          type: string
          maxLength: 128
        company:
          type: string
          maxLength: 128
        address1:
          type: string
          maxLength: 128
        address2:
          type: string
          maxLength: 128
        city:
          type: string
          maxLength: 64
        postcode:
          type: string
          maxLength: 10
        country:
          type: string
          example: FR
          minLength: 2
          maxLength: 2
        cart:
          type: array
        discountCode:
          type: string
          maxLength: 32
        affiliateId:
          type: string
          maxLength: 32
        custom1:
          type: string
          maxLength: 128
        custom2:
          type: string
          maxLength: 128
        custom3:
          type: string
          maxLength: 128
        custom4:
          type: string
          maxLength: 128
        custom5:
          type: string
          maxLength: 128
        customJson:
          type: object
    UUID:
      type: object
      properties:
        uuid:
          type: string
          example: 2ae4c7bb76b6e8a323a12ecea143e613
          description: >-
            If using dedicated bank buttons, an `authUrl` instead of a `uuid`
            will be returned. To learn more about **Dedicated Bank Buttons**,
            click [here](/configuration/dedicated-bank-buttons).
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````