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

# Transaction Status

> Get the status of a transaction

# Transaction Status

Retrieve the details and status of a specific transaction.

## Endpoint

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

## Headers

| Name          | Type   | Required | Description           |
| ------------- | ------ | -------- | --------------------- |
| Authorization | string | Yes      | Bearer YOUR\_API\_KEY |

## URL Parameters

| Parameter     | Type   | Description                   |
| ------------- | ------ | ----------------------------- |
| transactionId | string | Unique transaction identifier |

## Response

### Successful Response (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"
  }
}
```

### Error Response (404)

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

## Error Codes

| HTTP Code | Description           |
| --------- | --------------------- |
| 400       | Invalid parameters    |
| 401       | Invalid API key       |
| 403       | API under maintenance |
| 404       | Transaction not found |

## Request Example

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

## Notes

1. **Possible Statuses**

   * `PENDING` - Awaiting processing
   * `PROCESSING` - Being processed
   * `SUCCESS` - Transaction successful
   * `FAILED` - Transaction failed
   * `CANCELLED` - Transaction cancelled

2. **Security**
   * Only transactions linked to your API key are accessible
   * Expired transactions are also returned
   * History is maintained for reference


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

````