---
title: '4.2 Installment Rates Service'
url: 'https://dev.paytr.com/en/direkt-api/taksit-sorgulama'
markdown: 'https://dev.paytr.com/en/direkt-api/taksit-sorgulama.md'
lang: en
date: '2026-11-29'
description: 'When making direct API integration, the installment rates query API is used to pull the installment rates.Rates can vary daily. For this reason, you can pull these rates daily through the installment rates query API, save them in the database and update them.. You can apply these rates according to…'
---

- [Türkçe](https://dev.paytr.com/direkt-api/taksit-sorgulama)
- [English](https://dev.paytr.com/en/direkt-api/taksit-sorgulama)

 [](#)  [ Getting Started with PayTR ](https://dev.paytr.com/en)     [ Direct API ](https://dev.paytr.com/en/direkt-api)      4.2 Installment Rates Service    

# 4.2 Installment Rates Service

When making direct API integration, the installment rates query API is used to pull the installment rates.Rates can vary daily. For this reason, you can pull these rates daily through the installment rates query API, save them in the database and update them.. You can apply these rates according to the product price in installment transactions. In the tables below, the values returned in the result variable are described in detail.

**Required parameters for token creation**

| Field name / Type | Explanation | Compulsory | Limitations |
|---|---|---|---|
| merchant\_id | Merchant Number: Merchant number given to you by PayTR | Yes | - |
| request\_id | Request ID: With a maximum of 32 characters. | Yes | - |
| merchant\_salt | A value specific to your store, which you can access through the PayTR Merchant Panel > Information page. | Yes | - |
| merchant\_key | A value specific to your store, which you can access through the PayTR Merchant Panel > Information page. | Yes | - |

**Values to be sent in POST REQUEST content:**

| Field name / Type | Explanation |
|---|---|
| merchant\_id | Merchant Number: Merchant number given to you by PayTR |
| merchant\_key | Merchant password |
| merchant\_salt | Merchant secret key |
| single\_ratio | 1 or 0 (Merchant should be sent 1 for single shot rate) |
| abroad\_ratio | 1 or 0 (Merchant should be sent 1 for overseas single shot rate) |

**Returned values in the result variable:**

| Field name / Type | Explanation |
|---|---|
| status | Database operations are performed if it returns Success |
| request\_id | Request ID of up to 32 characters (string). Returns in response |
| err\_msg | Returns an error message (Example: "Required field value is invalid or not sent:") |
| max\_inst\_non\_bus | Maximum number of installments defined in your store |
| rates | Rates of the number of installments defined in your store are returned in array format according to card type (axess, world, maximum, cardfinans, paraf, advantage, combo, bonus) |

Installment inquiry sample codes: How to do it is explained in detail in the sample codes.

- [PHP](#63a66666420)
- [PYTHON](#63a66666421)
- [.NET](#63a66666422)
- [NODEJS](#63a66666423)

```Php
<?php
    $merchant_id='XXXXXX';
    $merchant_key='YYYYYYYYYYYYYY';
    $merchant_salt='ZZZZZZZZZZZZZZ';
    $request_id=time();

    $paytr_token=base64_encode(hash_hmac('sha256',$merchant_id.$request_id.$merchant_salt,$merchant_key,true));

    $post_vals=array(
        'merchant_id'=>$merchant_id,
        'request_id'=>$request_id,
        'paytr_token'=>$paytr_token
    );

    $ch=curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://www.paytr.com/odeme/taksit-oranlari");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1) ;
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vals);
    curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 90);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 90);

    $result = @curl_exec($ch);

    if(curl_errno($ch))
    {
        echo curl_error($ch);
        curl_close($ch);
        exit;
    }

    curl_close($ch);
    $result=json_decode($result,1);

    if($result[status]=='success')
    {
        //VT işlemleri vs.
        print_r($result);
    }
    else //Örn. $result -> array('status'=>'error', "err_msg" => "Zorunlu alan degeri gecersiz veya gonderilmedi: "
    {
        echo $result[err_msg];
    }

```

```python
# Python 3.6+

import base64
import hmac
import hashlib
import requests
import json
import time

merchant_id = 'XXX'
merchant_key = b'XXX'
merchant_salt = 'XXX'

request_id = str(time.time())

hash_str = merchant_id + request_id + merchant_salt
paytr_token = base64.b64encode(hmac.new(merchant_key, hash_str.encode(), hashlib.sha256).digest())

params = {
    'merchant_id': merchant_id,
    'request_id': request_id,
    'paytr_token': paytr_token
}

result = requests.post('https://www.paytr.com/odeme/taksit-oranlari', params)
res = json.loads(result.text)

if res['status'] == 'success':

    print(res)
else:
    """
    Örn.
    ['status']        - error
    ['err_no']        - 006
    ['err_msg']       - Zorunlu alan degeri gecersiz veya gonderilmedi: 
    """
    print(res)
```

```c
using Newtonsoft.Json.Linq; 
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Net;
using System.Security.Cryptography;
using System.Text;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class taksit_ornek : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e) {

        string merchant_id      = "XXXXXX";
        string merchant_key     = "YYYYYYYYYYYYYY";
        string merchant_salt    = "ZZZZZZZZZZZZZZ";

        string request_id       = "";

        NameValueCollection data = new NameValueCollection();
        data["merchant_id"] = merchant_id;
        data["request_id"] = request_id;

        string Birlestir = string.Concat(merchant_id, request_id, merchant_salt);
        HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(merchant_key));
        byte[] b = hmac.ComputeHash(Encoding.UTF8.GetBytes(Birlestir));
        data["paytr_token"] = Convert.ToBase64String(b);

        using (WebClient client = new WebClient()) {
            client.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
            byte[] result = client.UploadValues("https://www.paytr.com/odeme/taksit-oranlari", "POST", data);
            string ResultAuthTicket = Encoding.UTF8.GetString(result);
            dynamic json = JValue.Parse(ResultAuthTicket);

            if (json.status == "success") {

                Response.Write(json);
            }else{ 
                Response.Write(json.err_msg);
            }
        }
    }
}

```

```js
var request = require('request');
var crypto = require('crypto');
var express = require('express');
var microtime = require('microtime');
var app = express();

app.use(express.json());
app.use(express.urlencoded({ extended: true }));

var merchant_id = 'XXXXXX';
var merchant_key = 'YYYYYYYYYYYYYY';
var merchant_salt = 'ZZZZZZZZZZZZZZ';

var request_id = microtime.now(); 

var paytr_token = crypto.createHmac('sha256', merchant_key).update(merchant_id + request_id + merchant_salt).digest('base64');

app.get("/", function (req, res) {

var options = {
    'method': 'POST',
    'url': 'https://www.paytr.com/odeme/taksit-oranlari',
    'headers': {
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
        'merchant_id': merchant_id,
        'request_id': request_id,
        'paytr_token': paytr_token,
    }
};

request(options, function (error, response, body) {
    if (error) throw new Error(error);
    var res_data = JSON.parse(body);

    if (res_data.status == 'success') {
        res.send(response.body);

    } else {
        console.log(response.body);
        res.end(response.body);

    }

});

});

var port = 3200;
app.listen(port, function () {
    console.log("Server is running. Port:" + port);
});

```

Installment service sample codes[ **Click to download**](https://dev.paytr.com/en/direkt-api/taksit-sorgulama/PayTR%20Taksit%20Oranlar%C4%B1%20Sorgulama%20Servisi.zip)

---

## Navigation

- Parent: [Direct API](https://dev.paytr.com/en/direkt-api.md)
- Previous: [4.1 Card Storage API](https://dev.paytr.com/en/direkt-api/kart-saklama-api.md)
- Next: [4.3 BIN Lookup Service](https://dev.paytr.com/en/direkt-api/bin-sorgulama-servisi.md)
