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

# Plugin collection



## OpenAPI

````yaml POST /merchand/collection
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:
  /merchand/collection:
    post:
      tags:
        - Plugin
      summary: Creer et executer une collection plugin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PluginCollectionRequest'
      responses:
        '200':
          $ref: '#/components/responses/TransactionSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  schemas:
    PluginCollectionRequest:
      allOf:
        - $ref: '#/components/schemas/PaymentIntentRequest'
        - type: object
          required:
            - invoice_reference
          properties:
            invoice_reference:
              type: string
              example: WC-100045
            otp:
              type: integer
              example: 123456
    PaymentIntentRequest:
      type: object
      required:
        - amount
        - currency
        - transaction_uuid
        - provider
        - channel
        - customer_wallet
      properties:
        amount:
          type: integer
          example: 2500
        currency:
          type: string
          example: XAF
        transaction_uuid:
          type: string
          format: uuid
        provider:
          type: string
          example: CM_MTN_MOMO
        channel:
          type: string
          enum:
            - PROVIDER
            - WALLET
            - AUTO
          example: PROVIDER
        customer_wallet:
          type: string
          example: '237670000000'
        description:
          type: string
        metadata:
          type: object
          additionalProperties: true
        settlement_mode:
          type: string
          enum:
            - DIRECT
            - SPLIT
        distribution:
          type: array
          items:
            $ref: '#/components/schemas/SplitDistributionItem'
    TransactionApiResponse:
      allOf:
        - $ref: '#/components/schemas/ApiResponseBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/Transaction'
    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'
    SplitDistributionItem:
      type: object
      required:
        - matricule
        - rate
      properties:
        matricule:
          type: string
          example: MS-SELLER-001
        rate:
          type: number
          format: float
          example: 80
        description:
          type: string
        metadata:
          type: object
          additionalProperties: true
    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
    Transaction:
      type: object
      properties:
        transaction_reference:
          type: string
        environment:
          type: string
          example: prod
        invoice_reference:
          type: string
        provider_reference:
          type: string
        status:
          $ref: '#/components/schemas/TransactionStatus'
        operation:
          type: string
          enum:
            - COLLECTION
            - DISBURSEMENT
        channel:
          type: string
          enum:
            - PROVIDER
            - WALLET
        amount:
          type: integer
        currency:
          type: string
        confirmation_method:
          type: string
          enum:
            - MSISDN
            - LINK
            - QRCODE
            - null
        confirmation_url:
          type:
            - string
            - 'null'
        fee:
          type: integer
        required_total:
          type: integer
        settlement_mode:
          type: string
          enum:
            - DIRECT
            - SPLIT
        split_reference:
          type: string
        split_status:
          type: string
          enum:
            - NONE
            - PENDING
            - PROCESSING
            - SUCCESS
            - PARTIAL_SUCCESS
            - FAILED
        created_at:
          type: string
        updated_at:
          type: string
    TransactionStatus:
      type: string
      enum:
        - INITIATED
        - PENDING
        - SUBMITTED
        - PROCESSING
        - SUCCESS
        - COMPLETED
        - FAILED
        - CANCELLED
        - REFUNDED
  responses:
    TransactionSuccess:
      description: Transaction retournee
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TransactionApiResponse'
    BadRequest:
      description: Requete invalide
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Ressource introuvable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: Conflit d'idempotence
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````