# Satış

## Yeni Satış

<mark style="color:green;">`POST`</mark> `https://api.manikod.com/v1/sale`

Yeni satış işlemi başlatır. İşlem sonucunda 3D yada non3D işlemler için tarafınıza bir endpoint URL adresi dönülür (sale\_url). Dönülen adrese müşteri yönlendirilir. 3D secure süreci tamamlandıktan sonra aşağıda belirtilen callback adresinize işlem sonucu POST ile gönderilir.&#x20;

#### Headers

| Name           | Type   | Description                                                                  |
| -------------- | ------ | ---------------------------------------------------------------------------- |
| Authentication | string | Kimlik denetimi başlığıdır. Detaylar için kimlik denetimi sayfasına bakınız. |

#### Request Body

| Name        | Type    | Description                                                                                                           |
| ----------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
| amount      | number  | Ödenecek tutar. Örnek : 1000 TL için 1000.00                                                                          |
| description | string  | Satış açıklaması                                                                                                      |
| installment | integer | Taksit sayısı. Taksit yapılmayacak ise 1 gönderilir. En fazla 12 olabilir.                                            |
| order\_id   | string  | Üye işyerinin benzersiz işlem numarası                                                                                |
| callback    | string  | 3D doğrulama sonrasında cevabın POST ile gönderileceği adrestir.                                                      |
| card        | object  | JSON object tipinde kart numarası, son kullanma tarihi gibi detayları içeren veridir. Detaylar aşağıda açıklanmıştır. |
| client      | object  | JSON object tipinde müşteri bilgilerini içeren veridir. Detaylar aşağıda açıklanmıştır.                               |

{% tabs %}
{% tab title="200 İstek sonucu " %}

```javascript
{
    "status": "success",
    "sale_id": "423552",
    "sale_url": "https://www.manikod.com/gateway/bridge/46f3b22c-75b2-11ea-8276-8c8590b9713b",
}
```

{% endtab %}

{% tab title="403 " %}

```javascript
{
    "status": "error",
    "message": "Bu order_id daha önce kullanıldı",
}
```

{% endtab %}
{% endtabs %}

#### card JSON OBJECT

| Başlık | Veri Tipi | Zorunlu | Açıklama                                               |
| ------ | --------- | ------- | ------------------------------------------------------ |
| holder | string    | Evet    | Kartın üzerindeki isim                                 |
| pan    | string    | Evet    | Kart numarası                                          |
| month  | numeric   | Evet    | 2 haneli kart son kullanma tarihi ayıdır               |
| year   | numeric   | Evet    | 4 haneli kart son kullanma tarihi yılıdır              |
| cvc    | numeric   | Evet    | Kartın arka yüzündeki güvenlik kodunun son 3 hanesidir |

#### client JSON OBJECT

| Başlık       | Veri Tipi | Zorunlu | Açıklama                            |
| ------------ | --------- | ------- | ----------------------------------- |
| name         | string    | Evet    | Müşteri adı soyadı                  |
| phone        | string    | Evet    | Müşteri telefon numarası            |
| email        | string    | Evet    | Müşteri eposta adresi               |
| address      | string    | Evet    | Müşteri adresi                      |
| city         | string    | Evet    | Müşteri şehri                       |
| country      | string    | Evet    | Müşterinin ülkesi                   |
| postal\_code | string    | Evet    | Müşterinin posta kodu bilgisi       |
| ip           | string    | Evet    | Siparişi veren müşterinin ip adresi |

#### Örnek İstek

```javascript
{
	"amount" : "9000.00",
	"description" : "Apple Iphone XS Max",
	"installment" : 1,
	"callback" : "http://mnk/callback",
	"order_id" : 100,
	"card" : {
		"pan" : "4355084355084358",
		"month" : "12",
		"year" : "2030",
		"cvc" : "000",
		"holder" : "Can Ünlü"
	},
	"client" : {
		"name" : "Can Ünlü",
		"phone" : "5462421500",
		"email" : "can@manikod.net",
		"address" : "Erciyes Teknopark No:325",
		"city" : "Kayseri",
		"country" : "Türkiye",
		"postal_code" : "38000",
		"ip" : "77.88.77.66"
	}
}
```


---

# 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://developer.manikod.com/services/api/sale.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.
