---
title: Uygulama ödemeleri
description: Uygulamanız için abonelik ödemesi alın.
full: true
---

## Kullanılabilir abonelikleri getir [#getAvailableSubscriptions]

**`getAvailableSubscriptions`** (query, v1 · v2)

Bu API ile bir mağaza uygulaması için kullanılabilir abonelikleri alabilirsiniz.

Parametreler:

_Parametre yok._

Dönen değer: `[GetAvailableSubscriptionResponse!]!`

Örnek istek - Kullanılabilir abonelikleri listeleme (`POST https://api.myikas.com/api/v2/admin/graphql`):

Uygulamanızın mağazanın bölgesine ve para birimine göre sunulan abonelik paketlerini fiyatları ve deneme süreleriyle birlikte döndürür. Uygulama içi fiyatlandırma ekranını bu sonuçla oluşturabilirsiniz.

```graphql
query GetAvailableSubscriptions {
  getAvailableSubscriptions {
    id
    key
    name
    currencyCode
    prices {
      period
      price
    }
    trialConfig {
      days
    }
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "getAvailableSubscriptions": [
      {
        "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
        "key": "string",
        "name": "Örnek",
        "currencyCode": "EUR",
        "prices": [
          {
            "period": "MONTHLY",
            "price": 129.9
          }
        ],
        "trialConfig": {
          "days": 1
        }
      }
    ]
  }
}
```

## Abonelik ödemesi oluştur [#createMerchantAppPayment]

**`createMerchantAppPayment`** (mutation, v2)

Bu API ile uygulama abonelik ID'si kullanarak bir mağaza uygulamasına ödeme özellikleri ekleyebilirsiniz.

Yalnızca v2 endpoint'inde: `https://api.myikas.com/api/v2/admin/graphql`

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `input` (zorunlu) | `CreateMerchantAppPaymentWithSubscriptionInput!` | İşlemin girdi nesnesi. |

Dönen değer: `MerchantAppPayment`

Örnek istek - Abonelikli uygulama ödemesi oluşturma (`POST https://api.myikas.com/api/v2/admin/graphql`):

Mağaza yöneticisi uygulamanızda bir abonelik paketi seçtiğinde, paketin `storeAppListingSubscriptionKey` değeriyle ödeme kaydı oluşturur ve yöneticiyi `merchantPaymentUrl` adresindeki ödeme ekranına yönlendirirsiniz. Mağaza deneme veya ücretsiz paketteyse `APP_PAYMENT_NOT_ALLOWED`, anahtar uygulamanızın paketleriyle eşleşmezse `APP_SUBSCRIPTION_NOT_FOUND` hatası döner.

```graphql
mutation CreateMerchantAppPayment($input: CreateMerchantAppPaymentWithSubscriptionInput!) {
  createMerchantAppPayment(input: $input) {
    id
    name
    status
    type
    storeAppListingSubscriptionKey
    prices {
      period
      price
    }
    merchantPaymentUrl
    createdAt
  }
}
```

```json
{
  "input": {
    "storeAppListingSubscriptionKey": "profesyonel-paket"
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "createMerchantAppPayment": {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "name": "Örnek",
      "status": "PAID",
      "type": "SUBSCRIPTION",
      "storeAppListingSubscriptionKey": "string",
      "prices": [
        {
          "period": "MONTHLY",
          "price": 129.9
        }
      ],
      "merchantPaymentUrl": "https://ornek.myikas.com",
      "createdAt": 1735725600000
    }
  }
}
```

## Abonelik ödemesi oluştur (v1) [#createMerchantAppPaymentWithSubscription]

**`createMerchantAppPaymentWithSubscription`** (mutation, v1)

Bu API ile uygulama abonelik ID'si kullanarak bir mağaza uygulamasına ödeme özellikleri ekleyebilirsiniz.

Yalnızca v1 endpoint'inde: `https://api.myikas.com/api/v1/admin/graphql`. v2 karşılığı: `createMerchantAppPayment`.

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `input` (zorunlu) | `CreateMerchantAppPaymentWithSubscriptionInput!` | İşlemin girdi nesnesi. |

Dönen değer: `MerchantAppPayment`

Örnek istek - Abonelik paketiyle uygulama ödemesi oluşturma (`POST https://api.myikas.com/api/v1/admin/graphql`):

v1 üzerinde, uygulama yayın sayfasında tanımlı bir abonelik paketi için ödeme kaydı oluşturur; yalnızca paketin aylık ve yıllık fiyatları ödemeye eklenir. Mağaza deneme veya ücretsiz paketteyse `APP_PAYMENT_NOT_ALLOWED`, anahtar bulunamazsa `APP_SUBSCRIPTION_NOT_FOUND` hatası döner.

```graphql
mutation CreateMerchantAppPaymentWithSubscription($input: CreateMerchantAppPaymentWithSubscriptionInput!) {
  createMerchantAppPaymentWithSubscription(input: $input) {
    id
    name
    status
    storeAppListingSubscriptionKey
    prices {
      period
      price
    }
    merchantPaymentUrl
  }
}
```

```json
{
  "input": {
    "storeAppListingSubscriptionKey": "profesyonel-paket"
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "createMerchantAppPaymentWithSubscription": {
      "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
      "name": "Örnek",
      "status": "PAID",
      "storeAppListingSubscriptionKey": "string",
      "prices": [
        {
          "period": "MONTHLY",
          "price": 129.9
        }
      ],
      "merchantPaymentUrl": "https://ornek.myikas.com"
    }
  }
}
```

## Uygulama ödemelerini listele [#listMerchantAppPayment]

**`listMerchantAppPayment`** (query, v1 · v2)

Bu API ile bir mağazanın uygulama için oluşturduğu ödeme özelliklerini görüntüleyebilirsiniz.

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `id` | `StringFilterInput` | Kaydın ID değeri. |
| `pagination` | `PaginationInput` | Sayfalama özelliği, yanıt verisinin belirli bölümlerini filtrelemenizi ve görüntülemenizi sağlar. |

Dönen değer: `MerchantAppPaymentPaginationResponse!`

Örnek istek - Uygulama ödemesinin durumunu sorgulama (`POST https://api.myikas.com/api/v2/admin/graphql`):

Mağaza yöneticisi ödeme ekranından uygulamanıza döndüğünde, oluşturduğunuz ödeme kaydının `status` değerini kontrol ederek ödemenin tamamlanıp tamamlanmadığını doğrulamak için kullanılır.

```graphql
query ListMerchantAppPayment($id: StringFilterInput, $pagination: PaginationInput) {
  listMerchantAppPayment(id: $id, pagination: $pagination) {
    count
    hasNext
    page
    limit
    data {
      id
      name
      status
      type
      storeAppListingSubscriptionKey
      prices {
        period
        price
      }
      paymentDate
      createdAt
    }
  }
}
```

```json
{
  "id": {
    "eq": "830da687-e1f2-40a8-8990-5d633adc4d28"
  },
  "pagination": {
    "page": 1,
    "limit": 10
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "listMerchantAppPayment": {
      "count": 1,
      "hasNext": true,
      "page": 1,
      "limit": 50,
      "data": [
        {
          "id": "0f9d2c3e-6b1a-4c7e-9a52-3d8e1f4b7c21",
          "name": "Örnek",
          "status": "PAID",
          "type": "SUBSCRIPTION",
          "storeAppListingSubscriptionKey": "string",
          "prices": [
            {
              "period": "MONTHLY",
              "price": 129.9
            }
          ],
          "paymentDate": 1735725600000,
          "createdAt": 1735725600000
        }
      ]
    }
  }
}
```

## Demo günü bilgisini al [#getAppDemoDay]

**`getAppDemoDay`** (mutation, v1 · v2)

Uygulamanızın abonelik paketi için tanımlı deneme süresini gün olarak döner. Deneme süresi yoksa `null` döner.

Parametreler:

| Alan | Tip | Açıklama |
| --- | --- | --- |
| `input` (zorunlu) | `CreateMerchantAppPaymentWithSubscriptionInput!` | İşlemin girdi nesnesi. |

Dönen değer: `Float`

Örnek istek - Deneme süresini alma (`POST https://api.myikas.com/api/v2/admin/graphql`):

Seçilen abonelik paketinin kaç günlük deneme süresi sunduğunu döndürür; paket için deneme süresi tanımlı değilse `null` döner. Fiyatlandırma ekranında "14 gün ücretsiz dene" gibi bilgileri göstermek için kullanılır.

```graphql
mutation GetAppDemoDay($input: CreateMerchantAppPaymentWithSubscriptionInput!) {
  getAppDemoDay(input: $input)
}
```

```json
{
  "input": {
    "storeAppListingSubscriptionKey": "profesyonel-paket"
  }
}
```

Örnek yanıt (temsili):

```json
{
  "data": {
    "getAppDemoDay": 1
  }
}
```
