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

# Creer un lien de paiement



## OpenAPI

````yaml POST /payment-links
openapi: 3.1.0
info:
  title: Mysoleas API
  version: 3.0.0
  description: >-
    Nouvelle architecture Mysoleas: gateway de paiement et authentification
    OAuth 2.0.
servers:
  - url: https://api.mysoleas.com
    description: Gateway Mysoleas
  - url: https://account.mysoleas.com
    description: Authentification Mysoleas
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Plugin
  - name: Payment links
  - name: Subscriptions
  - name: Collections
  - name: Disbursements
  - name: Catalog
paths:
  /payment-links:
    post:
      tags:
        - Payment links
      summary: Creer un lien de paiement
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentLinkCreateRequest'
      responses:
        '200':
          $ref: '#/components/responses/PaymentLinkSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  schemas:
    PaymentLinkCreateRequest:
      type: object
      required:
        - currency
      properties:
        amount:
          type: integer
          minimum: 1
        currency:
          type: string
          example: XAF
        provider:
          type: string
          example: CM_MTN_MOMO
        channel:
          type: string
          enum:
            - PROVIDER
            - WALLET
            - AUTO
        title:
          type: string
        description:
          type: string
        expires_at:
          type: string
          format: date-time
        max_usage:
          type: integer
          minimum: 1
        metadata:
          type: object
          additionalProperties: true
    PaymentLinkApiResponse:
      allOf:
        - $ref: '#/components/schemas/ApiResponseBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/PaymentLink'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: integer
          example: 400
        message:
          type: string
          example: empty_data
        error:
          type: object
          properties:
            details:
              type:
                - object
                - array
                - string
                - 'null'
    ApiResponseBase:
      type: object
      properties:
        code:
          type: integer
          example: 200
        success:
          type: boolean
          example: true
        locale:
          type: string
          example: fr
        message:
          type: string
        meta:
          type: object
          additionalProperties: true
    PaymentLink:
      type: object
      properties:
        reference:
          type: string
        short_code:
          type: string
        payment_url:
          type: string
        status:
          type: string
          enum:
            - ACTIVE
            - DISABLED
            - EXPIRED
        amount:
          type:
            - integer
            - 'null'
        currency:
          type: string
        title:
          type: string
        description:
          type: string
        expires_at:
          type:
            - string
            - 'null'
        created_at:
          type: string
  responses:
    PaymentLinkSuccess:
      description: Lien de paiement cree
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentLinkApiResponse'
    BadRequest:
      description: Requete invalide
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````