# 2. Ödeme Bazlı

## Ödeme Bazlı Ödeme Onayla

<mark style="color:green;">`POST`</mark> `{{Base Adres}}/api/paywall/marketplace/reject/payment`

{% hint style="info" %}
Önemli: **Ödeme** servisini kullanabilmeniz için 'Header' alanında '**apikeypublic**' ve '**apiclientpublic**' parametrelerini göndermeniz gerekmektedir.\
\
[<mark style="color:green;">**PaymentAPI Adresi**</mark>](https://developer.paywall.one/ortam)
{% endhint %}

<table><thead><tr><th width="188">Parametre</th><th width="79">Tip</th><th width="107">Zorunlu</th><th width="403">Açıklama</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Evet</td><td>Üye işyeri panelinden temin etmiş olduğunuz Public Key.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Evet</td><td>Üye işyeri panelinden temin etmiş olduğunuz Public Client.</td></tr></tbody></table>

**Servise gönderilmesi gereken parametreler şu şekildedir:**

<table><thead><tr><th width="244">Parametre</th><th width="157">Tip</th><th width="131">Zorunlu</th><th width="336">Açıklama</th></tr></thead><tbody><tr><td>PaymentId</td><td>int</td><td>Evet</td><td>Ödemenin Paywall tarafındaki Id bilgisi kullanılmalıdır</td></tr></tbody></table>

**Servise gönderilecek örnek&#x20;**<mark style="color:green;">**JSON**</mark>**&#x20;ve&#x20;**<mark style="color:green;">**örnek kodlar**</mark>**&#x20;aşağıdaki gibidir.**

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json5
{
    "PaymentId": 1644501
}
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}

```csharp
// Soon
```

{% endtab %}

{% tab title="GO" %}

```go
// Soon
```

{% endtab %}

{% tab title="Java" %}

```java
// Soon
```

{% endtab %}

{% tab title="PHP" %}

```php
// Soon
```

{% endtab %}

{% tab title="Python" %}

```python
// Soon
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
// Soon
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
// Soon
```

{% endtab %}

{% tab title="Curl" %}

```sh
// Soon
```

{% endtab %}
{% endtabs %}

**Servisten dönen cevap:**

<table><thead><tr><th width="189">Parametre</th><th width="100.33333333333331">Tip</th><th>Açıklama</th></tr></thead><tbody><tr><td>ErrorCode</td><td>int</td><td>Hata kodu. İşlem başarılı ise '0' değerini döner.</td></tr><tr><td>Result</td><td>bool</td><td>True ya da false değeri döner. İşlem başarılı iste 'true' değerini döner.</td></tr><tr><td>Message</td><td>string</td><td>İşlem hatalıysa, bu hataya dair belirtilen mesajdır, locale parametresine göre dil desteği sunar.</td></tr><tr><td>Body</td><td>nesne</td><td>İşlem detay bilgileri</td></tr></tbody></table>

{% hint style="success" %}
Başarılı için örnek cevap
{% endhint %}

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Success": [
            {
                "ProductId": 1626132
            },
            {
                "ProductId": 1626133
            },
            {
                "ProductId": 1626134
            },
            {
                "ProductId": 1626135
            },
            {
                "ProductId": 1626136
            }
        ],
        "Fail": []
    }
}
```

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

{% hint style="danger" %}
Başarısız için örnek cevap
{% endhint %}

{% tabs %}
{% tab title="JSON" %}

```json
{
    "ErrorCode": 1,
    "Result": false,
    "Message": "",
    "Body": {
        "Success": [],
        "Fail": [
            {
                "ProductId": 1626132,
                "Reason": "This product marketplace earning calculated not found"
            },
            {
                "ProductId": 1626133,
                "Reason": "This product marketplace earning calculated not found"
            },
            {
                "ProductId": 1626134,
                "Reason": "This product marketplace earning calculated not found"
            },
            {
                "ProductId": 1626135,
                "Reason": "This product marketplace earning calculated not found"
            },
            {
                "ProductId": 1626136,
                "Reason": "This product marketplace earning calculated not found"
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}
