# 7. Installment Inquiry

## Installment Inquiry

<mark style="color:blue;">`GET`</mark> `{{Base Address}}/api/paywall/installment`

Sending a request to the address provided above should be sufficient. You can use the 'Base Address' as you wish for both the testing environment and the production environment.

{% hint style="info" %}
**Important**: To use the installment inquiry service, you need to send the '**apikeypublic**' and '**apiclientpublic**' parameters in the 'Header' field.<br>

[<mark style="color:green;">**PaymentAPI**</mark> ](https://developer.paywall.one/payment-orchestration-integration-document/environment)[<mark style="color:green;">**Address**</mark>](https://developer.paywall.one/payment-orchestration-integration-document/environment)
{% endhint %}

<table><thead><tr><th width="192">Parameter</th><th width="102">Type</th><th width="142">Compulsory</th><th>Description</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Yes</td><td>The Public Key obtained from the merchant panel.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>The Public Client obtained from the merchant panel.</td></tr><tr><td>currencyid</td><td>int</td><td>Yes</td><td><p>The currency in which the payment is intended to be made.</p><p><br>See:  <a href="../system-data/currency">Currency</a></p></td></tr><tr><td>amount</td><td>decimal</td><td>Yes</td><td>The amount associated with the payment.</td></tr><tr><td>binnumber</td><td>string</td><td>No</td><td>The first 6 digits of the card for which the payment is intended to be made.</td></tr><tr><td>distinctduplicates</td><td>bool</td><td>Yes</td><td>In cases where multiple payment providers are used and if you send this parameter as TRUE, the response object will only contain one row for 2 installments even if it is active in multiple providers.</td></tr></tbody></table>

**The response returned from the service:**

<table><thead><tr><th width="156">Parameter</th><th width="91.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>ErrorCode</td><td>int</td><td>Error code. It returns a value of '0' if the operation is successful.</td></tr><tr><td>Result</td><td>bool</td><td>It returns either true or false. If the operation is successful, it returns 'true'.</td></tr><tr><td>Message</td><td>string</td><td>If the operation is unsuccessful, this is the message related to the error.</td></tr><tr><td>Body</td><td>object</td><td>It returns 'filled' if the installment option is available, and 'empty' otherwise.</td></tr></tbody></table>

💳 For inquiries without a BIN number, you can access the card families within the returned list [Card Families](https://developer.paywall.one/payment-orchestration-integration-document/payment-service/broken-reference) You can access them from the page

{% tabs %}
{% tab title="JSON (with BIN Numbers)" %}
{% code overflow="wrap" lineNumbers="true" %}

```json5
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "CardBank": "T.HALK BANKASI A.Ş.",
        "CardBrand": "Master Card",
        "CardFamily": "Paraf",
        "CardKind": "Ticari Kart",
        "CardType": "Credit",
        "Options": [
            {
                "Installment": 1,
                "Commission": 1.00,
                "Interest": 3.00,
                "RawAmount": 10.1,
                "InterestAmount": 39.80
            }
        ]
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="JSON (without BIN Numbers)" %}
{% code lineNumbers="true" %}

```json
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": [
        {
            "CardFamilyId": 1,
            "CardFamily": "World",
            "Option": [
                {
                    "Installment": 1,
                    "Commission": 0.00,
                    "Interest": 1.00,
                    "RawAmount": 10.1,
                    "InterestAmount": 20.00
                }
            ]
        },
        {
            "CardFamilyId": 8,
            "CardFamily": "Advantage",
            "Option": [
                {
                    "Installment": 2,
                    "Commission": 1.00,
                    "Interest": 0.00,
                    "RawAmount": 10.1,
                    "InterestAmount": 10.1
                },
                {
                    "Installment": 4,
                    "Commission": 1.00,
                    "Interest": 0.00,
                    "RawAmount": 10.1,
                    "InterestAmount": 10.1
                }
            ]
        },
        {
            "CardFamilyId": 5,
            "CardFamily": "Paraf",
            "Option": [
                {
                    "Installment": 3,
                    "Commission": 1.00,
                    "Interest": 0.00,
                    "RawAmount": 10.1,
                    "InterestAmount": 10.1
                },
                {
                    "Installment": 5,
                    "Commission": 1.00,
                    "Interest": 0.00,
                    "RawAmount": 10.1,
                    "InterestAmount": 10.1
                },
                {
                    "Installment": 6,
                    "Commission": 1.00,
                    "Interest": 0.00,
                    "RawAmount": 10.1,
                    "InterestAmount": 10.1
                }
            ]
        }
    ]
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
