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

# Créer un remboursement

> Remboursez tout ou partie d'une transaction éligible.

```bash cURL theme={null}
curl --request POST \
  --url https://api.bizconnectpay.com/api/v1/refunds \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: refund-cmd-9481' \
  --data '{
    "transaction_reference": "BCP-TXN-01JAC92Y",
    "wallet_id": "4e969910-8f06-4cd2-b92c-01765472e0e9",
    "amount": "5000",
    "reason": "Article retourné"
  }'
```

```json Payload theme={null}
{
  "transaction_reference": "BCP-TXN-01JAC92Y",
  "wallet_id": "4e969910-8f06-4cd2-b92c-01765472e0e9",
  "amount": "5000",
  "reason": "Article retourné"
}
```

```json 201 Created theme={null}
{
  "success": true,
  "data": {
    "id": "8fd9cf11-8fb8-459c-abef-62d6a4712304",
    "reference": "BCP-REF-01JACB1F",
    "transaction_id": "26226880-a6ea-4f91-8a6e-303fa77fe311",
    "wallet_id": "4e969910-8f06-4cd2-b92c-01765472e0e9",
    "amount": "5000.0000",
    "reason": "Article retourné",
    "status": "PENDING",
    "created_at": "2026-10-20T13:15:00.000000Z"
  },
  "meta": {
    "correlation_id": "56e83e0c-13fe-42d3-b6e5-ef890021313b"
  }
}
```


## OpenAPI

````yaml openapi.json POST /refunds
openapi: 3.1.0
info:
  title: BizConnectPay API
  version: 1.0.0
  description: >-
    API serveur-à-serveur pour les collectes, décaissements, transactions,
    remboursements, liens de paiement et cartes virtuelles.
servers:
  - url: https://api.bizconnectpay.com/api/v1
    description: Passerelle API BizConnectPay
security:
  - bearerAuth: []
tags:
  - name: Authentification
  - name: Services
  - name: Collectes
  - name: Transactions
  - name: Décaissements
  - name: Remboursements
  - name: Liens de paiement
  - name: Porteurs de carte
  - name: Cartes virtuelles
paths:
  /refunds:
    post:
      tags:
        - Remboursements
      summary: Demander un remboursement
      operationId: createRefund
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequest'
      responses:
        '201':
          $ref: '#/components/responses/Created'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: Clé unique et stable pour cette opération métier.
      schema:
        type: string
        maxLength: 255
  schemas:
    RefundRequest:
      type: object
      required:
        - transaction_reference
        - wallet_id
        - amount
        - reason
      properties:
        transaction_reference:
          type: string
        wallet_id:
          type: string
          format: uuid
        amount:
          type: number
          exclusiveMinimum: 0
        reason:
          type: string
    SuccessEnvelope:
      type: object
      properties:
        success:
          type: boolean
          const: true
        data: {}
        meta:
          $ref: '#/components/schemas/Meta'
    ErrorEnvelope:
      type: object
      properties:
        success:
          type: boolean
          const: false
        data:
          type: object
          properties:
            error:
              type: object
              properties:
                code:
                  type: string
                message:
                  type: string
                details:
                  type:
                    - object
                    - array
        meta:
          $ref: '#/components/schemas/Meta'
    Meta:
      type: object
      properties:
        correlation_id:
          type:
            - string
            - 'null'
          format: uuid
  responses:
    Created:
      description: Ressource créée
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessEnvelope'
    ValidationError:
      description: Payload ou règle métier invalide
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.