# Ödeme ve İşlem Servisleri

### Satış İşlemi

Bu servis, GMU cihazı üzerinden standart satış işlemi gerçekleştirmek için kullanılır.

Satış işlemi sırasında, ödeme tutarı ve satış kalemleri POS cihazına iletilir ve işlem sonucu anlık olarak yanıtlanır.

Başarılı işlem sonucunda dönen paymentId, iade, iptal ve sorgulama işlemlerinde kullanılır.

> saleDocumentType alanı ile belge tipi belirlenir:
>
> 1 → E-Fatura\
> 9 → Gider Pusulası

## POST /v2/terminal-host/gmu/payment

> GMU cihazı üzerinden standart satış işlemi gerçekleştirir. E-Fatura için \`saleDocumentType=1\`, Gider Pusulası için \`saleDocumentType=9\` kullanılabilir.<br>

```json
{"openapi":"3.0.3","info":{"title":"Terminal API - GMU Ödeme ve İşlem Servisleri","version":"1.0.0"},"tags":[{"name":"GMU Payment","description":"GMU satış ve işlem servisleri"}],"servers":[{"url":"https://sandbox-api.iyzipay.com","description":"Sandbox Ortam"},{"url":"https://api.iyzipay.com","description":"Canlı Ortam"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token kullanılarak Bearer Token doğrulaması yapılır."}},"parameters":{"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"İçerik tipi"}},"schemas":{"GmuPaymentRequest":{"type":"object","required":["deviceUniqueId","transactionReferenceId","price","paidPrice","saleAppName","saleAppVersion","saleDocumentType","saleItems","paymentType"],"properties":{"locale":{"type":"string","description":"Dil kodu. Varsayılan TR"},"conversationId":{"type":"string","description":"İstek korelasyon ID’si. Boş bırakılırsa otomatik UUID atanır."},"deviceUniqueId":{"type":"string","description":"Cihazın benzersiz kimliği. Maksimum 64 karakter"},"transactionReferenceId":{"type":"string","description":"Çağıran tarafın bu işleme atadığı benzersiz referans ID. İptal ve sorgulama işlemlerinde kullanılabilir."},"price":{"type":"decimal","description":"Brüt tutar. Pozitif olmalıdır"},"paidPrice":{"type":"decimal","description":"Ödenecek nihai tutar. Pozitif olmalıdır"},"paymentType":{"type":"string","description":"Ödeme türü. (Kart, Nakit vb.)","enum":["CARD","CASH"]},"currency":{"type":"string","description":"Para birimi. Varsayılan TRY","enum":["TRY","USD","EUR"]},"installment":{"type":"integer","description":"Taksit sayısı. Varsayılan 1"},"saleAppName":{"type":"string","description":"Satış uygulamasının adı"},"saleAppVersion":{"type":"string","description":"Satış uygulamasının versiyonu"},"saleDocumentType":{"type":"string","description":"Belge tipi. E-Fatura için 1, Gider Pusulası için 9","enum":["1","9"]},"notificationPhone":{"type":"string","description":"SMS bildirimi istenilen telefon numarası"},"notificationEmail":{"type":"string","description":"Bildirim istenilen E-posta adresi"},"saleItems":{"type":"array","description":"Satış kalemleri. En az 1 adet olmalıdır.","minItems":1,"items":{"$ref":"#/components/schemas/SaleItem"}},"buyerInfo":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BuyerInfo"}],"description":"Nihai tüketici değilse doldurulması zorunludur."}}},"SaleItem":{"type":"object","required":["name","unitCode","taxGroupCode","itemQuantity","unitPriceAmount","grossPriceAmount","totalPriceAmount"],"properties":{"name":{"type":"string","description":"Ürün veya hizmet adı"},"generic":{"type":"boolean","description":"Genel ürün bilgisi"},"unitCode":{"type":"string","description":"Birim kodu. Örnek C62 adet anlamına gelir"},"taxGroupCode":{"type":"string","description":"KDV grubu kodu"},"itemQuantity":{"type":"integer","description":"Ürün adedi"},"unitPriceAmount":{"type":"decimal","description":"Birim fiyat. Pozitif olmalıdır"},"grossPriceAmount":{"type":"decimal","description":"Brüt fiyat. Pozitif olmalıdır"},"totalPriceAmount":{"type":"decimal","description":"Toplam fiyat. Pozitif olmalıdır"}}},"BuyerInfo":{"type":"object","properties":{"customerType":{"type":"integer","description":"Müşteri tipi. 1 bireysel, 2 kurumsal","enum":[1,2]},"firstName":{"type":"string","description":"Ad"},"middleName":{"type":"string","description":"İkinci ad"},"familyName":{"type":"string","description":"Soyad"},"companyName":{"type":"string","description":"Şirket adı. Kurumsal müşteriler için kullanılır"},"taxOfficeCode":{"type":"string","description":"Vergi dairesi kodu"},"taxNumber":{"type":"string","description":"Vergi numarası veya TC kimlik numarası"},"country":{"type":"string","description":"Ülke"},"city":{"type":"string","description":"Şehir"},"district":{"type":"string","description":"İlçe"}}},"GmuPaymentResponse":{"type":"object","properties":{"status":{"type":"string","description":"success veya failure"},"errorCode":{"type":"string","description":"Hata kodu. Başarılı işlemlerde 0 döner"},"errorMessage":{"type":"string","description":"Hata mesajı"},"conversationId":{"type":"string","description":"İstek ile eşleşen korelasyon ID"},"systemTime":{"type":"integer","description":"işlem zamanı (epoch ms)"},"deviceUniqueId":{"type":"string","description":"İşlem yapılan cihazın ID'si"},"transactionReferenceId":{"type":"string","description":"Çağıran tarafın referans ID'si"},"transactionDateTime":{"type":"string","description":"İşlemin gerçekleştiği tarih ve saat"},"paymentId":{"type":"string","description":"Oluşturulan ödeme ID. İade ve iptal işlemlerinde kullanılır."},"paymentDate":{"type":"integer","description":"Ödeme tarihi. YYYYMMDD formatındadır"},"price":{"type":"decimal","description":"İşlem tutarı"},"installment":{"type":"integer","description":"Taksit sayısı"},"acquirerId":{"type":"string","description":"Acquirer banka ID"},"bankMerchantId":{"type":"string","description":"Banka üye işyeri numarası"},"bankTerminalId":{"type":"string","description":"Banka terminal ID"},"issuerId":{"type":"string","description":"Kartı çıkaran kuruluş ID"},"currency":{"type":"string","description":"Para birimi","enum":["TRY","USD","EUR"]},"authCode":{"type":"string","description":"Onay kodu"},"binNumber":{"type":"string","description":"Kartın BIN numarası. İlk 6 hanedir"},"lastFourDigits":{"type":"string","description":"Kartın son 4 hanesi"},"hostReference":{"type":"string","description":"Host referans numarası"},"cardType":{"type":"string","description":"Kart tipi. Örnek CREDIT veya DEBIT"},"batchNo":{"type":"string","description":"Batch parti numarası"},"stanNo":{"type":"string","description":"STAN numarası"},"posEntryModeCode":{"type":"string","description":"POS giriş modu kodu"},"saleItems":{"type":"array","description":"İşleme eklenen satış kalemleri detayı","items":{"$ref":"#/components/schemas/AddedSaleItem"}},"saleNumber":{"type":"string","description":"Satış numarası. Parçalı ödeme ekleme 7. madde ve tamamlama 8. madde servislerinde kullanılır"}}},"AddedSaleItem":{"type":"object","properties":{"name":{"type":"string","description":"İşleme eklenen satış kalemi adı"},"generic":{"type":"boolean","description":"Genel ürün bilgisi"},"unitCode":{"type":"string","description":"Birim kodu"},"taxGroupCode":{"type":"string","description":"KDV grubu kodu"},"itemQuantity":{"type":"integer","description":"Ürün adedi"},"unitPriceAmount":{"type":"decimal","description":"Birim fiyat"},"grossPriceAmount":{"type":"decimal","description":"Brüt fiyat"},"totalPriceAmount":{"type":"decimal","description":"Toplam fiyat"}}}}},"paths":{"/v2/terminal-host/gmu/payment":{"post":{"tags":["GMU Payment"],"description":"GMU cihazı üzerinden standart satış işlemi gerçekleştirir. E-Fatura için `saleDocumentType=1`, Gider Pusulası için `saleDocumentType=9` kullanılabilir.\n","parameters":[{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuPaymentRequest"}}}},"responses":{"200":{"description":"Başarılı işlem sonucu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuPaymentResponse"}}}},"400":{"description":"Hatalı istek","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuPaymentResponse"}}}}}}}}}
```

### İşlem Sorgulama

## POST /v2/terminal-host/gmu/payment/query-transaction-status

> Bir ödeme, iade veya iptal işleminin güncel durumu sorgulanır. \`paymentId\` veya \`transactionReferenceId\` ile sorgu yapılabilir, ikisi birlikte de gönderilebilir.<br>

```json
{"openapi":"3.0.3","info":{"title":"Terminal API - GMU Ödeme ve İşlem Servisleri","version":"1.0.0"},"tags":[{"name":"GMU Payment","description":"GMU satış ve işlem servisleri"}],"servers":[{"url":"https://sandbox-api.iyzipay.com","description":"Sandbox Ortam"},{"url":"https://api.iyzipay.com","description":"Canlı Ortam"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token kullanılarak Bearer Token doğrulaması yapılır."}},"parameters":{"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"İçerik tipi"}},"schemas":{"GmuQueryTransactionStatusRequest":{"type":"object","description":"paymentId veya transactionReferenceId alanlarından en az biri gönderilmelidir.","properties":{"locale":{"type":"string","description":"Dil kodu"},"conversationId":{"type":"string","description":"Korelasyon ID"},"paymentId":{"type":"string","description":"Sorgulanmak istenen işlem için ödeme ID bilgisi"},"deviceUniqueId":{"type":"string","description":"Cihaz benzersiz ID"},"transactionReferenceId":{"type":"string","description":"Sorgulanmak istenen işlemi başlatırken gönderilen transactionReferenceId"}}},"GmuQueryTransactionStatusResponse":{"allOf":[{"$ref":"#/components/schemas/GmuPaymentResponse"},{"type":"object","properties":{"cancelHostReference":{"type":"string","nullable":true,"description":"İptal yapılmışsa iptal işlemine ait host referansı"},"refundHostReference":{"type":"string","nullable":true,"description":"İade yapılmışsa iade işlemine ait host referansı"}}}]},"GmuPaymentResponse":{"type":"object","properties":{"status":{"type":"string","description":"success veya failure"},"errorCode":{"type":"string","description":"Hata kodu. Başarılı işlemlerde 0 döner"},"errorMessage":{"type":"string","description":"Hata mesajı"},"conversationId":{"type":"string","description":"İstek ile eşleşen korelasyon ID"},"systemTime":{"type":"integer","description":"işlem zamanı (epoch ms)"},"deviceUniqueId":{"type":"string","description":"İşlem yapılan cihazın ID'si"},"transactionReferenceId":{"type":"string","description":"Çağıran tarafın referans ID'si"},"transactionDateTime":{"type":"string","description":"İşlemin gerçekleştiği tarih ve saat"},"paymentId":{"type":"string","description":"Oluşturulan ödeme ID. İade ve iptal işlemlerinde kullanılır."},"paymentDate":{"type":"integer","description":"Ödeme tarihi. YYYYMMDD formatındadır"},"price":{"type":"decimal","description":"İşlem tutarı"},"installment":{"type":"integer","description":"Taksit sayısı"},"acquirerId":{"type":"string","description":"Acquirer banka ID"},"bankMerchantId":{"type":"string","description":"Banka üye işyeri numarası"},"bankTerminalId":{"type":"string","description":"Banka terminal ID"},"issuerId":{"type":"string","description":"Kartı çıkaran kuruluş ID"},"currency":{"type":"string","description":"Para birimi","enum":["TRY","USD","EUR"]},"authCode":{"type":"string","description":"Onay kodu"},"binNumber":{"type":"string","description":"Kartın BIN numarası. İlk 6 hanedir"},"lastFourDigits":{"type":"string","description":"Kartın son 4 hanesi"},"hostReference":{"type":"string","description":"Host referans numarası"},"cardType":{"type":"string","description":"Kart tipi. Örnek CREDIT veya DEBIT"},"batchNo":{"type":"string","description":"Batch parti numarası"},"stanNo":{"type":"string","description":"STAN numarası"},"posEntryModeCode":{"type":"string","description":"POS giriş modu kodu"},"saleItems":{"type":"array","description":"İşleme eklenen satış kalemleri detayı","items":{"$ref":"#/components/schemas/AddedSaleItem"}},"saleNumber":{"type":"string","description":"Satış numarası. Parçalı ödeme ekleme 7. madde ve tamamlama 8. madde servislerinde kullanılır"}}},"AddedSaleItem":{"type":"object","properties":{"name":{"type":"string","description":"İşleme eklenen satış kalemi adı"},"generic":{"type":"boolean","description":"Genel ürün bilgisi"},"unitCode":{"type":"string","description":"Birim kodu"},"taxGroupCode":{"type":"string","description":"KDV grubu kodu"},"itemQuantity":{"type":"integer","description":"Ürün adedi"},"unitPriceAmount":{"type":"decimal","description":"Birim fiyat"},"grossPriceAmount":{"type":"decimal","description":"Brüt fiyat"},"totalPriceAmount":{"type":"decimal","description":"Toplam fiyat"}}}}},"paths":{"/v2/terminal-host/gmu/payment/query-transaction-status":{"post":{"tags":["GMU Payment"],"description":"Bir ödeme, iade veya iptal işleminin güncel durumu sorgulanır. `paymentId` veya `transactionReferenceId` ile sorgu yapılabilir, ikisi birlikte de gönderilebilir.\n","parameters":[{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"description":"paymentId veya transactionReferenceId alanlarından en az biri gönderilmelidir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuQueryTransactionStatusRequest"}}}},"responses":{"200":{"description":"Başarılı işlem sorgulama sonucu","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuQueryTransactionStatusResponse"}}}},"400":{"description":"Hatalı istek","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuQueryTransactionStatusResponse"}}}}}}}}}
```


---

# 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://docs.iyzico.com/urunler/fiziksel-pos/terminal-api-entegrasyonu/vuk-507-servisleri/odeme-ve-islem-servisleri.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.
