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

# Obtenir un jeton marchand

> Authentifie un marchand avec les identifiants reçus par SMS à la création du compte
(numéro de téléphone + mot de passe) et renvoie un JWT à passer dans l'en-tête
`authenticationtoken` des endpoints du dashboard.




## OpenAPI

````yaml /openapi.yaml post /user/login-merchant
openapi: 3.1.0
info:
  title: Djonanko Pay API
  version: 1.0.0
  description: >
    API de la passerelle de paiement mobile money **Djonanko Pay**.


    Deux modes d'authentification coexistent :


    - **Clé API** (`x-api-key` + `x-api-secret`) — pour l'intégration serveur à
    serveur :
      création de liens de paiement et de QR codes.
    - **Jeton marchand** (`authenticationtoken`) — un JWT obtenu via `POST
    /user/login-merchant`,
      utilisé par le dashboard marchand pour tout le reste (statut, solde, reversements, rapports…).

    Toutes les réponses sont en JSON. Les montants sont exprimés en **FCFA (XOF
    / XAF)** sans décimales.
  contact:
    name: Support Djonanko
    url: https://www.djonanko.ci/#contact
servers:
  - url: https://apidjonanko.tech
    description: Production
security: []
tags:
  - name: Authentification
  - name: Paiements
  - name: Solde & statistiques
  - name: Webhooks
  - name: Reversements
  - name: Sécurité
  - name: Rapports
  - name: Compte marchand
paths:
  /user/login-merchant:
    post:
      tags:
        - Authentification
      summary: Obtenir un jeton marchand
      description: >
        Authentifie un marchand avec les identifiants reçus par SMS à la
        création du compte

        (numéro de téléphone + mot de passe) et renvoie un JWT à passer dans
        l'en-tête

        `authenticationtoken` des endpoints du dashboard.
      operationId: loginMerchant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - numero
                - password
              properties:
                numero:
                  type: string
                  description: Numéro de téléphone du compte marchand.
                  example: '0700000000'
                password:
                  type: string
                  format: password
                  example: ••••••••
      responses:
        '201':
          description: Jeton généré.
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: JWT à utiliser dans l'en-tête `authenticationtoken`.
                    example: <jwt>
                  refresh_token:
                    type: string
                  user:
                    type: object
                    properties:
                      id:
                        type: string
                      numero:
                        type: string
                      fullname:
                        type: string
                      email:
                        type: string
                      merchant_id:
                        type: string
                        format: uuid
                        description: Identifiant du compte marchand lié.
                      userType:
                        type: string
                        example: MERCHANT
        '404':
          description: Identifiants incorrects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 404
                message: >-
                  Connexion impossible, vérifiez vos accès ou contactez
                  l'administrateur
                error: Not Found
components:
  schemas:
    Error:
      type: object
      properties:
        statusCode:
          type: integer
          example: 401
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: Invalid API credentials
        error:
          type: string
          example: Unauthorized

````