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

# Transaction history

> Read your organization's transactions, newest first.

Use `limit` and `offset` to paginate. The default limit is 50, the maximum is 100, and the default offset is 0. The response contains `transactions`, `limit`, and `offset`.

```bash theme={null}
curl "https://api.sarafa.site/v3/transactions?limit=50&offset=0" \
  -H "Authorization: Bearer $SARAFA_API_KEY"
```

## Read one wallet's history

Use `GET /v3/wallets/{currency}/transactions` with the same query parameters and response shape:

```bash theme={null}
curl "https://api.sarafa.site/v3/wallets/USD/transactions?limit=50&offset=0" \
  -H "Authorization: Bearer $SARAFA_API_KEY"
```

The wallet must belong to your organization's account; an unknown wallet returns HTTP `404`.

The transaction's `reference` is your merchant reference, or `null` for records without an API reference. Use `tx_reference` to [read payment details](https://docs.sarafa.ss/api-reference/endpoint/getTransaction.md), including its quote, exchange details, and approval expiry where applicable.


## OpenAPI

````yaml api-reference/openapi.json GET /transactions
openapi: 3.0.3
info:
  title: Sarafa Business API
  version: 3.0.0
  description: >-
    Server-side access to your verified organization's account. Use Bearer API
    keys, decimal-string amounts, and unique merchant references. Charge,
    transfer, and swap default to quotes. Only transaction.status = completed
    confirms payment.
servers:
  - url: https://api.sarafa.site/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Accounts
  - name: Transactions
  - name: Payments
  - name: Checkout
paths:
  /transactions:
    get:
      tags:
        - Transactions
      summary: List transactions
      description: Your organization's transactions, newest first.
      operationId: listTransactions
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: Paginated transaction history.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionListResponse'
        '400':
          $ref: '#/components/responses/Error400'
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '500':
          $ref: '#/components/responses/Error500'
        '503':
          $ref: '#/components/responses/Error503'
components:
  headers:
    RequestId:
      description: Include this request identifier when contacting support.
      schema:
        type: string
  schemas:
    TransactionListResponse:
      type: object
      required:
        - status
        - transactions
        - limit
        - offset
      properties:
        status:
          type: string
          enum:
            - success
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
        limit:
          type: integer
        offset:
          type: integer
    Transaction:
      allOf:
        - $ref: '#/components/schemas/TransactionSummary'
        - type: object
          required:
            - currency
            - reference
          properties:
            currency:
              type: string
            reference:
              type: string
              nullable: true
              description: Merchant reference, or null for records without API identity.
    Error:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: string
          enum:
            - failed
        error:
          type: string
        request_id:
          type: string
          description: >-
            Present on processing errors. Every response also includes
            X-Request-Id.
        issues:
          type: array
          items:
            type: object
            required:
              - path
              - message
            properties:
              path:
                type: array
                items:
                  oneOf:
                    - type: string
                    - type: integer
              message:
                type: string
    TransactionSummary:
      type: object
      required:
        - tx_reference
        - transaction_type
        - product
        - description
        - amount
        - total_amount
        - total_fees
        - channel
        - status
        - created_at
        - updated_at
      properties:
        tx_reference:
          type: string
          description: >-
            Sarafa payment reference. Newly generated references are 13
            characters; existing longer references remain valid.
          example: TX7A2B9C4D1E0
        transaction_type:
          type: string
          enum:
            - credit
            - debit
        product:
          type: string
        description:
          type: string
        amount:
          type: string
          description: Decimal string.
        total_amount:
          type: string
          description: Decimal string.
        total_fees:
          type: string
          description: Decimal string.
        channel:
          type: string
        status:
          type: string
          description: >-
            Payment state. Only completed confirms payment; pending and
            needs_review are not final. Failed approvals can include a rejection
            or expiry reason.
          example: pending
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  responses:
    Error400:
      description: >-
        Invalid JSON, fields, amount, precision, or currency/channel
        combination.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error401:
      description: Missing, invalid, inactive, or revoked API key.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error403:
      description: Required verification or authorization missing.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error404:
      description: Resource not found within your organization.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error500:
      description: >-
        Processing failure. Retry uncertain executions with the same reference
        and unchanged payload.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error503:
      description: >-
        Service failure. Retry uncertain executions with the same reference and
        unchanged payload.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sfb_live_<public_identifier>.<secret>
      description: >-
        Use the full key from the merchant dashboard API section. Keep it on
        your server.

````

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