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

# E-Pos alış oranlarını oku

> Hoppa’dan aile/taksit bazlı alış kataloğunu alır.

## Ne yapar?

Hoppa’dan aile/taksit bazlı alış kataloğunu alır. purchaseRate yüzde değeridir. Katalog hesabın satış tarifesini değiştirmez; ödeme sırasında kart ve tutara göre yeniden fiyatlanır. Eksik oran sıfır kabul edilmez. family=null aile bilgisi belirtilmemiş kayıttır.

## Ön koşullar ve izin

Gereken izin: **`muhasip:epos:read`**. Açık izin her durumda zorunludur; genel erişim veya yönetici yetkisi bunun yerine geçmez. `write` tek başına `read` sağlamaz. Firma kimlik bilgilerinden belirlenir; ilişkili kayıtlar aynı firmaya ait olmalıdır. Firma paketi ücretli ve süresi aktif olmalıdır.

[Kimlik ve izinler](https://docs.muhasip.pro/baslangic/kimlik-ve-izinler.md) · [E-Pos entegrasyonu](https://docs.muhasip.pro/rehberler/e-pos-entegrasyonu.md)

## İstek örnekleri

Örnekler temsilîdir. Kimlikleri, sürümleri ve işyeri bilgilerini kendi kayıtlarınızla değiştirin. Oranlar yüzde, `amountMinor` değerleri kuruştur. Gereken işlem anahtarını çağrıdan önce kalıcı saklayın; otomatik tekrar yapmayın. Gerçek işyeri anahtarını güvenli sunucu ortamından sağlayın. Node.js örneği Node.js 20 veya üzeri, PHP örneği cURL uzantısı gerektirir.

```bash cURL theme={null}
curl --request GET 'https://api.muhasip.pro/apps/bankpos/accounts/600000000000000000000001/installment-rates' \
  --user "$MUHASIP_API_USER_ID:$MUHASIP_API_SECRET" \
  --header 'Accept: application/json'
```

```php PHP theme={null}
<?php
$apiUserId = getenv("MUHASIP_API_USER_ID");
$secret = getenv("MUHASIP_API_SECRET");
if (!$apiUserId || !$secret) {
    throw new RuntimeException("API kimlik bilgileri eksik.");
}
$headers = ["Accept: application/json"];
$curl = curl_init("https://api.muhasip.pro/apps/bankpos/accounts/600000000000000000000001/installment-rates");
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD => $apiUserId . ":" . $secret,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_TIMEOUT => 100,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
$httpStatus = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
    curl_close($curl);
    throw new RuntimeException("Sonuç belirsiz; yeniden göndermeden işlem ve ödeme durumunu okuyun.");
}
curl_close($curl);
$result = json_decode($response, true, 512, JSON_THROW_ON_ERROR);
// Ödeme bağlantısını veya gizli alanları günlüklemeyin.
echo json_encode(["httpStatus" => $httpStatus, "status" => $result["status"] ?? null, "id" => $result["result"]["_id"] ?? null, "operationId" => $result["operation"]["operationId"] ?? null], JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR);
```

```javascript Node.js theme={null}
async function main() {
  const apiUserId = process.env.MUHASIP_API_USER_ID
  const secret = process.env.MUHASIP_API_SECRET
  if (!apiUserId || !secret) throw new Error("API kimlik bilgileri eksik.")
  const headers = {
    Authorization: `Basic ${Buffer.from(`${apiUserId}:${secret}`, "utf8").toString("base64")}`,
    Accept: "application/json"
  }
  const response = await fetch(
    "https://api.muhasip.pro/apps/bankpos/accounts/600000000000000000000001/installment-rates",
    {
      method: "GET",
      headers,
      redirect: "error",
      signal: AbortSignal.timeout(100000)
    }
  )
  const result = await response.json()
  // Ödeme bağlantısını veya gizli alanları günlüklemeyin.
  console.log({
    httpStatus: response.status,
    status: result.status,
    id: result.result?._id,
    operationId: result.operation?.operationId
  })
}
main().catch(() => {
  console.error("Sonuç alınamadı; işlem/ödeme durumunu kontrol etmeden yeniden göndermeyin.")
  process.exitCode = 1
})
```

## Cevabı değerlendirin

Aşağıdaki cevap temsilîdir; varsa `url` alanı örnekte yer tutucudur. Uygulamada dönen adresi doğrudan kullanın ve günlüklemeyin.

```json theme={null}
{
  "status": true,
  "result": {
    "accountId": "600000000000000000000001",
    "revision": 3,
    "fetchedAt": "2026-10-25T09:00:00.000Z",
    "rates": [
      {
        "family": "paraf",
        "installment": 1,
        "purchaseRate": 1.49
      },
      {
        "family": "paraf",
        "installment": 3,
        "purchaseRate": 4.8
      }
    ]
  }
}
```

## Hata durumunda

| HTTP / kod | Yapılacak işlem |
| - | - |
| `400 BANKPOS_INVALID_REQUEST` | İstek, kimlik, filtre veya oran biçimini düzeltin. |
| `401 UNAUTHORIZED` | API kimliği, erişim süresi ve firma durumunu kontrol edin. |
| `403 API_SCOPE_FORBIDDEN` | Açık E-Pos iznini, firma/IP ve paket koşullarını kontrol edin. |
| `429` | İstek sıklığını azaltın; mali çağrıyı körlemesine tekrarlamayın. |
| `500 INTERNAL_ERROR` | İstek tamamlanamadı; yazma sonucunu kayıttan kontrol edin. |
| `404 BANKPOS_ACCOUNT_NOT_FOUND` | Aynı firmaya ait hesap kimliğini kullanın. |
| `409 BANKPOS_REVISION_CONFLICT` | Güncel hesap veya tercih sürümünü okuyun. |
| `422 BANKPOS_RATES_UNSUPPORTED` | Sağlayıcının oran listeleme desteğini kontrol edin. |
| `422 BANKPOS_CREDENTIALS_REQUIRED` | Önce bağlantı bilgilerini kaydedin. |
| `502 BANKPOS_RATES_UNAVAILABLE` | Geçersiz veya eksik katalog cevabını sıfır oran saymayın. |
| `503 BANKPOS_BRIDGE_UNAVAILABLE` | Bağlantı şu anda kullanılamıyor; mali isteği otomatik tekrarlamayın. |

[Hata yönetimi](https://docs.muhasip.pro/rehberler/hata-yonetimi.md) · [İşlem takibi](https://docs.muhasip.pro/rehberler/islem-takibi.md)

## Sonraki adım

[E-Pos entegrasyon akışını izleyin](https://docs.muhasip.pro/rehberler/e-pos-entegrasyonu.md). Hesap değişikliğinde dönen `revision` değerini saklayın; ödemede bağlantı oluşturmayı, müşterinin 3D işlemini ve doğrulanmış mali sonucu ayrı değerlendirin.


## OpenAPI

````yaml openapi.json GET /apps/bankpos/accounts/{accountId}/installment-rates
openapi: 3.0.3
info:
  title: Muhasip API
  version: 2026-10-25.1
  description: >-
    Fatura, banka, POS ve tahsilat, GİB e-Arşiv, pazaryeri, online işlemler,
    görevler, ajanda ve takvim entegrasyonları. İşlem alanları, izinler, istek
    ve cevap örnekleri ile hata yönetimi.
servers:
  - url: https://api.muhasip.pro
    description: Muhasip API
security:
  - BasicAuth: []
tags:
  - name: Uygulamalar
  - name: Görev yönetimi
  - name: Ajanda ve takvim
  - name: Fatura
    description: Fatura bağlantısı, belge işlemleri ve muhasebeye aktarım.
  - name: Banka
    description: >-
      Banka hesapları, hareketler, mahsup ve mevcut çalışma alanı alt
      kaynakları.
  - name: POS ve tahsilat
    description: POS hesapları, komisyonlar ve tahsilat bağlantıları.
  - name: GİB e-Arşiv
    description: GİB hesabı, sorgu, taslak ve SMS imzalama.
  - name: Pazaryeri
    description: Trendyol bağlantısı ve sipariş aktarımı.
  - name: Online işlemler
    description: Online işlem ekranı yapılandırması.
  - name: İşlem takibi
    description: Mali işlem durumu ve tekrar çağrı makbuzları.
  - name: Cari hesaplar
    description: Cari hesaplar işlemleri.
  - name: Kasa ve transferler
    description: Kasa ve transferler işlemleri.
  - name: Alış-satış (e-belgesiz)
    description: Alış-satış (e-belgesiz) işlemleri.
  - name: Ödemeler ve mahsuplaşma
    description: Ödemeler ve mahsuplaşma işlemleri.
  - name: Muhasebe seçenekleri
    description: Muhasebe seçenekleri işlemleri.
  - name: E-Pos
    description: >-
      Firmanın kendi banka/ödeme kuruluşu sanal POS hesapları, tarifeler, ödeme
      talepleri ve tam iptal/iade.
paths:
  /apps/bankpos/accounts/{accountId}/installment-rates:
    get:
      tags:
        - E-Pos
      summary: E-Pos alış oranlarını oku
      description: >-
        Hoppa’dan aile/taksit bazlı alış kataloğunu alır. purchaseRate yüzde
        değeridir. Katalog hesabın satış tarifesini değiştirmez; ödeme sırasında
        kart ve tutara göre yeniden fiyatlanır. Eksik oran sıfır kabul edilmez.
        family=null aile bilgisi belirtilmemiş kayıttır.
      operationId: eposInstallmentRates
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
            description: Aynı firmaya ait 24 haneli kayıt kimliği.
      responses:
        '200':
          description: İşlem cevabı; örnek temsilîdir.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    enum:
                      - true
                  result:
                    $ref: '#/components/schemas/EposPurchaseRates'
                additionalProperties: false
                required:
                  - status
                  - result
              example:
                status: true
                result:
                  accountId: '600000000000000000000001'
                  revision: 3
                  fetchedAt: '2026-10-25T09:00:00.000Z'
                  rates:
                    - family: paraf
                      installment: 1
                      purchaseRate: 1.49
                    - family: paraf
                      installment: 3
                      purchaseRate: 4.8
        '400':
          description: İşlem cevabı; örnek temsilîdir.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EposError'
              example:
                status: false
                code: BANKPOS_INVALID_REQUEST
                message: İstek alanları geçersiz.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            BANKPOS_REVISION_CONFLICT. İlgili kaydı ve işlem durumunu kontrol
            edin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EposError'
              example:
                status: false
                code: BANKPOS_REVISION_CONFLICT
                message: Güncel hesap veya tercih sürümünü okuyun.
        '422':
          description: >-
            BANKPOS_RATES_UNSUPPORTED · BANKPOS_CREDENTIALS_REQUIRED. İlgili
            kaydı ve işlem durumunu kontrol edin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EposError'
              example:
                status: false
                code: BANKPOS_RATES_UNSUPPORTED
                message: Sağlayıcının oran listeleme desteğini kontrol edin.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          description: İşlem cevabı; örnek temsilîdir.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EposError'
              example:
                status: false
                code: INTERNAL_ERROR
                message: İşlem gerçekleştirilemedi.
        '502':
          description: >-
            BANKPOS_RATES_UNAVAILABLE. İlgili kaydı ve işlem durumunu kontrol
            edin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EposError'
              example:
                status: false
                code: BANKPOS_RATES_UNAVAILABLE
                message: Geçersiz veya eksik katalog cevabını sıfır oran saymayın.
        '503':
          description: >-
            BANKPOS_BRIDGE_UNAVAILABLE. İlgili kaydı ve işlem durumunu kontrol
            edin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EposError'
              example:
                status: false
                code: BANKPOS_BRIDGE_UNAVAILABLE
                message: >-
                  Bağlantı şu anda kullanılamıyor; mali isteği otomatik
                  tekrarlamayın.
components:
  schemas:
    EposPurchaseRates:
      type: object
      properties:
        accountId:
          type: string
          pattern: ^[a-fA-F0-9]{24}$
          description: Aynı firmaya ait 24 haneli kayıt kimliği.
        revision:
          type: integer
          minimum: 1
          maximum: 9007199254740990
          description: >-
            Güncel hesap sürümü. Hesap değişikliği sonrasında dönen yeni değeri
            kullanın.
        fetchedAt:
          type: string
          format: date-time
        rates:
          type: array
          items:
            type: object
            properties:
              family:
                type: string
                pattern: ^[a-z0-9_-]{1,40}$
                description: >-
                  Kart ailesi kodu. __proto__, prototype ve constructor
                  kullanılamaz.
                nullable: true
              installment:
                type: integer
                minimum: 1
                maximum: 12
              purchaseRate:
                type: number
                minimum: 0
                maximum: 100
                multipleOf: 0.0001
                description: >-
                  Yüzde oranı; en fazla dört ondalık. 1.49 = %1,49; açık 0
                  komisyonsuz satıştır.
            additionalProperties: false
            required:
              - family
              - installment
              - purchaseRate
          minItems: 1
          maxItems: 500
      additionalProperties: false
      required:
        - accountId
        - revision
        - fetchedAt
        - rates
    EposError:
      type: object
      properties:
        status:
          type: boolean
          enum:
            - false
        code:
          type: string
        message:
          type: string
        operation:
          $ref: '#/components/schemas/ApiOperation'
        operationId:
          type: string
        operationIds:
          type: array
          items:
            type: string
        retryable:
          type: boolean
        reviewRequired:
          type: boolean
      additionalProperties: true
      required:
        - status
        - code
        - message
    ApiOperation:
      type: object
      properties:
        operationId:
          type: string
          pattern: ^[a-f0-9]{64}$
        type:
          type: string
        state:
          type: string
          enum:
            - claimed
            - dispatching
            - provider_accepted
            - succeeded
            - rejected
            - failed_before_dispatch
            - review_required
        reviewRequired:
          type: boolean
        retryable:
          type: boolean
        result:
          $ref: '#/components/schemas/ApiOperationReceipt'
        statusUrl:
          type: string
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 tarih-saat.
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 tarih-saat.
      required:
        - operationId
        - type
        - state
        - reviewRequired
        - retryable
        - result
        - statusUrl
        - createdAt
        - updatedAt
    Error:
      type: object
      properties:
        status:
          type: boolean
        code:
          type: string
        message:
          type: string
        description:
          type: string
        retryable:
          type: boolean
        reviewRequired:
          type: boolean
        operationId:
          type: string
      required:
        - status
      additionalProperties: true
    RateLimitError:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 429
        error:
          type: string
        message:
          type: string
      required:
        - status
        - error
        - message
    ApiOperationReceipt:
      type: object
      properties:
        resultId:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9_.:-]+$
        transactionId:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9_.:-]+$
        uuid:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9_.:-]+$
        id:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9_.:-]+$
        providerId:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9_.:-]+$
        documentId:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9_.:-]+$
        paymentId:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9_.:-]+$
        orderId:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9_.:-]+$
        uuids:
          type: array
          items:
            type: string
            maxLength: 200
            pattern: ^[A-Za-z0-9_.:-]+$
          maxItems: 100
        sourcePaymentId:
          type: string
          description: 24 karakterli kayıt kimliği.
          pattern: ^[a-f0-9A-F]{24}$
        destinationPaymentId:
          type: string
          description: 24 karakterli kayıt kimliği.
          pattern: ^[a-f0-9A-F]{24}$
      additionalProperties: false
  responses:
    Unauthorized:
      description: API kimliği/parolası, erişim süresi veya firma doğrulanamadı.
      headers:
        WWW-Authenticate:
          schema:
            type: string
          description: Basic realm="Muhasip API", charset="UTF-8"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: false
            code: UNAUTHORIZED
            message: API kimlik bilgileri doğrulanamadı.
    Forbidden:
      description: Ürün, IP, modül izni veya kaynak kapsamı uygun değil.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: false
            message: Ürün, IP, modül izni veya kaynak kapsamı uygun değil.
    NotFound:
      description: Kayıt bulunamadı veya bu erişim bağlamında kullanılamıyor.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: false
    RateLimited:
      description: Ortak istek sınırı aşıldı; sayısal status alanı kullanılır.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
          example:
            status: 429
            error: Too Many Requests
            message: Rate limit exceeded. Please try again later.
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Kullanıcı adı apiUserId, parola secretKey. Aktif ve süresi geçmemiş API
        kullanıcısı ve uygun firma gerekir.

````

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