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

# Statut de Transaction

> Obtenir le statut d'une transaction

# Statut de Transaction

Récupérez les détails et le statut d'une transaction spécifique.

## Endpoint

```bash theme={null}
GET /api/v1/transaction/{transactionId}
```

## Headers

| Nom           | Type   | Requis | Description           |
| ------------- | ------ | ------ | --------------------- |
| Authorization | string | Oui    | Bearer YOUR\_API\_KEY |

## Paramètres URL

| Paramètre     | Type   | Description                          |
| ------------- | ------ | ------------------------------------ |
| transactionId | string | Identifiant unique de la transaction |

## Réponse

### Réponse Réussie (200)

```json theme={null}
{
  "message": "Transaction fetched successfully",
  "transaction": {
    "ServiceName": "Orange Money Senegal",
    "ServiceCode": "OM_SN_CASHOUT",
    "OperatorApi": "OM789012345",
    "Type": "CASHOUT",
    "Amount": 1000,
    "Number": "771234567",
    "Status": "SUCCESS",
    "Initiated_at": "2024-03-20T10:30:00Z",
    "Completed_at": "2024-03-20T10:35:00Z"
  }
}
```

### Réponse d'Erreur (404)

```json theme={null}
{
  "message": ["No transaction found"],
  "success": false
}
```

## Codes d'Erreur

| Code HTTP | Description             |
| --------- | ----------------------- |
| 400       | Paramètres invalides    |
| 401       | Clé API invalide        |
| 403       | API en maintenance      |
| 404       | Transaction non trouvée |

## Exemple de Requête

```bash theme={null}
curl -X GET https://api-m.dexchange.sn/api/v1/transaction/TID123456789 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Notes

1. **Statuts Possibles**

   * `PENDING` - En attente
   * `PROCESSING` - En cours de traitement
   * `SUCCESS` - Transaction réussie
   * `FAILED` - Transaction échouée
   * `CANCELLED` - Transaction annulée

2. **Sécurité**
   * Seules les transactions liées à votre API key sont accessibles
   * Les transactions expirées sont également retournées
   * L'historique est conservé pour référence


## OpenAPI

````yaml GET /api/v1/transaction/{transactionId}
openapi: 3.0.1
info:
  title: DEXCHANGE-API
  description: >-
    Unifiez tous vos paiements mobiles à travers une seule API puissante.
    DEXCHANGE-API est une passerelle de paiement qui regroupe plusieurs wallets
    (Orange Money, Wave, Free Money, Wizall) sur une seule API, simplifiant
    l'intégration des paiements mobiles en Afrique de l'Ouest.
  version: 1.0.0
  contact:
    name: DEXCHANGE Support
    email: team@dexchange.sn
    url: https://docs-api.dexchange.sn
  license:
    name: MIT
servers:
  - url: https://api-m.dexchange.sn
    description: Production Server
security:
  - bearerAuth: []
tags:
  - name: Transactions
    description: Operations for managing payment transactions
  - name: Merchant
    description: Merchant-specific payment operations
  - name: Services
    description: Service and balance information
  - name: Billing
    description: Bill payment and prepaid top-up operations
paths:
  /api/v1/transaction/{transactionId}:
    get:
      tags:
        - Transactions
      summary: Obtenir les détails d'une transaction
      description: Récupérer les informations d'une transaction spécifique
      operationId: getTransaction
      parameters:
        - name: transactionId
          in: path
          description: ID de la transaction
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Transaction trouvée
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '404':
          description: Transaction non trouvée
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TransactionResponse:
      type: object
      properties:
        message:
          type: string
        transaction:
          type: object
          properties:
            ServiceName:
              type: string
            ServiceCode:
              type: string
            Amount:
              type: number
            Number:
              type: string
            Status:
              type: string
            Initiated_at:
              type: string
              format: date-time
            Completed_at:
              type: string
              format: date-time
    Error:
      type: object
      properties:
        message:
          type: array
          items:
            type: string
        success:
          type: boolean
      required:
        - message
        - success
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Entrez votre clé API comme: Bearer <API_KEY>'

````