# Fatura oluşturma

Eğer düzenli ödeme emri oluşturma servisinde “**is\_fixed\_price**” parametresini “false” gönderirseniz, kredi kartından çekilecek tutarı bu servis ile her defasında göndermelisiniz. Çekilecek tutarı göndermediğiniz durumda karttan belirtilen dönem için çekim yapılmaz. Bu yöntemi fatura ödemesi gibi değişken tutarlı ödemeleriniz için kullanabilirsiniz.

{% hint style="success" %}
<https://api.paynet.com.tr/v1/subscription/create_invoice>
{% endhint %}

{% tabs %}
{% tab title="İstek Parametreleri" %}

| Parametre İsmi       | Tip      | Zorunlu | Açıklama                                                                                               |
| -------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------ |
| **val\_date**        | datetime | Evet    | Çekileceği tarih                                                                                       |
| **amount**           | string   | Evet    | Çekilecek tutar.Tutar 100 ile çarpılmış olmalıdır. “10.00 TL” => “1000” olarak gönderilmeli.           |
| **subscription\_id** | string   | Evet\*  | Düzenli ödeme no                                                                                       |
| **reference\_no**    | string   | Evet\*  | Müşteri referans no bilgisi                                                                            |
| **agent\_amount**    | string   | Hayır   | Bayiye aktarılacak tutar. 100 ile çarpılmış hali olmalıdır.“10 TL” => “1000” olarak gönderilmeli.      |
| **company\_amount**  | string   | Hayır   | Ana firmaya aktarılacak tutar. 100 ile çarpılmış hali olmalıdır.“10 TL” => “1000” olarak gönderilmeli. |
| **invoice\_no**      | string   | Hayır   | Fatura no                                                                                              |
| **currency**         | string   | Hayır   | Para birimi                                                                                            |
| {% endtab %}         |          |         |                                                                                                        |

{% tab title="Dönüş Parametreleri" %}

| Parametre İsmi   | Tip    | Açıklama                                                                      |
| ---------------- | ------ | ----------------------------------------------------------------------------- |
| **object\_name** | string | Dönüş yapılan API'nin nesne adı                                               |
| **code**         | string | Dönüş sonucunun kodu. [Bknz](/genel-bilgiler/hata-kodlari/doenues-kodlari.md) |
| **message**      | string | Dönüş sonuç kodunun açıklaması                                                |
| {% endtab %}     |        |                                                                               |

{% tab title="Request" %}

```
{  
   "reference_no":"90000600",
   "company_amount":25972,
   "agent_amount":2926,
   "amount":28898,
   "currency":"TRY",
   "val_date":"03.10.2017 10:32:24",
   "invoice_no":"11400556"
}
```

{% endtab %}

{% tab title="Response" %}

```
{
"object_name":"subscription_invoice",
"code":0,
"message":"Başarılı Islem"
} 
```

{% endtab %}

{% tab title="Service Url" %}

| Sistem           | URL                                                                                                                                                                                                                                                  |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Canlı Sistem** | ​<https://api.paynet.com.tr/v1/subscription/create_invoice>                                                                                                                                                                                          |
| **Test Sistemi** | ​[https://pts-api.paynet.com.tr​​\[/v1/subscription/create\\\_invoice](https://doc.paynet.com.tr/servisler/abonelik/https:/pts-api.paynet.com.tr​​\[/v1/subscription/create\\_invoice)]\(<https://api.paynet.com.tr/v1/subscription/create_invoice>) |
| {% endtab %}     |                                                                                                                                                                                                                                                      |
| {% endtabs %}    |                                                                                                                                                                                                                                                      |

{% hint style="info" %}
\*subcription\_id veya reference\_no'dan en az birini göndermeniz gerekmektedir.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.paynet.com.tr/servisler/abonelik/duzenli-odeme-faturalandirma.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
