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

# Create Payment Gateway



## OpenAPI

````yaml api-reference/openapi.json post /v1/gateway
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.lygosapp.com
    description: Production Server
security: []
paths:
  /v1/gateway:
    post:
      tags:
        - Gateway
      summary: Create Payment Gateway
      operationId: create_payment_gateway_api_v1_api_gateway_post
      parameters:
        - name: api-key
          in: header
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentGatewaySchemas'
            examples:
              example1:
                summary: Exemple de création de gateway
                value:
                  amount: 5000
                  shop_name: Mon Magasin
                  message: 'Paiement pour commande #12345'
                  success_url: https://monsite.com/paiement-reussi
                  failure_url: https://monsite.com/paiement-echoue
                  order_id: CMD-2024-001
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentGatewaySchemas'
        '401':
          description: No API key
          content:
            application/json:
              examples:
                No API Key:
                  summary: No API Key
                  value:
                    detail:
                      message: No API Key.
                      type: NO_API_KEY_PROVIDED
        '404':
          description: Gateway Not Found
          content:
            application/json:
              examples:
                API Key Not found:
                  summary: API Key Not found
                  value:
                    detail:
                      message: API Key not found
                      type: API_KEY_NOT_FOUND
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreatePaymentGatewaySchemas:
      properties:
        amount:
          type: integer
          title: Amount
        shop_name:
          type: string
          title: Shop Name
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: ''
        success_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Success Url
          default: ''
        failure_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Url
          default: ''
        order_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Order Id
          default: ''
      type: object
      required:
        - amount
        - shop_name
      title: CreatePaymentGatewaySchemas
    PaymentGatewaySchemas:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        amount:
          type: integer
          title: Amount
        currency:
          type: string
          title: Currency
        shop_name:
          type: string
          title: Shop Name
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: ''
        user_id:
          type: string
          format: uuid
          title: User Id
        creation_date:
          type: string
          format: date-time
          title: Creation Date
        link:
          type: string
          title: Link
        order_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Order Id
          default: ''
        success_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Success Url
          default: ''
        failure_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Url
          default: ''
      type: object
      required:
        - id
        - amount
        - currency
        - shop_name
        - user_id
        - creation_date
        - link
      title: PaymentGatewaySchemas
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````