> For the complete documentation index, see [llms.txt](https://docs.iyzico.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iyzico.com/urunler/ceppos-app2app/app2app-v3/sorgulama.md).

# Sorgulama

`/payment/query` endpoint'i, daha önce oluşturulmuş bir ödemenin güncel durumunu sorgulamanızı sağlar. Yanıtta ödeme durumu, tutar, sipariş numarası ve kullanıcı bilgisi yer alır. Bu endpoint özellikle callback alınamadığı durumlarda veya ödeme durumunu periyodik olarak doğrulamak istediğinizde kullanılır.

## Ödeme Durumu Sorgulama

> Belirtilen \`paymentId\` ile bir ödemenin güncel durumunu sorgular.

```json
{"openapi":"3.0.3","info":{"title":"iyzico In-Store API - Payment Query","version":"3.0"},"servers":[{"url":"https://sandbox-api.iyzipay.com/v3/in-store","description":"Sandbox Ortamı"},{"url":"https://api.iyzipay.com/v3/in-store","description":"Canlı (Production) Ortam"}],"paths":{"/payment/query":{"post":{"summary":"Ödeme Durumu Sorgulama","description":"Belirtilen `paymentId` ile bir ödemenin güncel durumunu sorgular.","operationId":"queryPayment","parameters":[{"name":"x-api-key","in":"header","required":true,"description":"iyzico panelinizdeki CepPOS API anahtarı","schema":{"type":"string"}},{"name":"x-secret-key","in":"header","required":true,"description":"iyzico panelinizdeki CepPOS güvenlik anahtarı","schema":{"type":"string"}},{"name":"x-merchant-id","in":"header","required":true,"description":"iyzico hesabınızın üye işyeri numarası","schema":{"type":"string"}},{"name":"paymentId","in":"query","required":true,"description":"Sorgulanacak ödemenin ID'si","schema":{"type":"Long"}}],"responses":{"200":{"description":"Şifre başarıyla çözüldü","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"422":{"description":"Validasyon hatası — eksik veya hatalı alan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Sunucu hatası","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"SuccessResponse":{"type":"object","properties":{"status":{"type":"string","description":"İşlemin sonucunu gösterir. Başarılı durumlarda \"success\" döner."},"systemTime":{"type":"long","description":"Sunucu tarafındaki işlem zamanı (Unix epoch, milisaniye)."},"paymentId":{"type":"integer","description":"iyzico tarafından atanan benzersiz ödeme kimliği. İade ve sorgulama işlemlerinde referans olarak kullanılır."},"orderId":{"type":"string","description":"Pos tarafındaki işlem numarası."},"userId":{"type":"string","description":"Ödemeyi gerçekleştiren kullanıcının kimliği."},"transactionDetail":{"type":"object","description":"Ödemeye ait banka işlem detayları, kart bilgileri ve fiş verilerini içeren nesne.","$ref":"#/components/schemas/QueryTransactionDetail"},"Amount":{"type":"BigDecimal","description":"İşlem tutarı."},"CurrencyCode":{"type":"string","description":"İşlemin gerçekleştiği para birimi kodu."},"TransactionCode":{"type":"string","description":"İşlem tipi kodu."},"RecordId":{"type":"Long","description":"iyzico sistemindeki işlem kayıt numarası."},"MaskedPan":{"type":"string","description":"Maskelenmiş kart numarası."},"AuthorizationCode":{"type":"string","description":"Banka tarafından sağlanan yetkilendirme kodu."},"ResponseCodeValue":{"type":"string","description":"Bankadan dönen ham yanıt kodu."},"StatusCode":{"type":"string","description":"İşlemin durum kodu."},"HexColor":{"type":"string","description":"İşlem durumuna karşılık gelen renk kodu."},"ResultText":{"type":"string","description":"İşlem sonucunun kullanıcıya gösterilecek metni."},"IsVoidable":{"type":"boolean","description":"İşlemin iptal edilebilir olup olmadığını gösterir."},"IsRefundable":{"type":"boolean","description":"İşlemin iade edilebilir olup olmadığını gösterir."},"BankResponseCodeValue":{"type":"string","description":"Bankadan dönen yanıt kodu."},"IssuerBin":{"type":"string","description":"Kartı çıkaran bankanın BIN numarası."},"AcquirerId":{"type":"string","description":"İşlemi gerçekleştiren acquirer'ın kimliği."},"ClearingDate":{"type":"string","nullable":true,"description":"Takas tarihi. Henüz gerçekleşmemişse null döner."},"HasDiscount":{"type":"boolean","description":"İşlemde indirim uygulanıp uygulanmadığını gösterir."}}},"QueryTransactionDetail":{"type":"object","properties":{"ScreenMessage":{"type":"string","description":"Ekranda gösterilecek bilgilendirme mesajı."},"Rrn":{"type":"string","description":"Referans işlem numarası (Retrieval Reference Number)."},"TransactionDate":{"type":"string","description":"İşlem tarihi ve saati (okunabilir format)."},"TransactionDateISO":{"type":"string","format":"date-time","description":"İşlem tarihi ve saati (ISO 8601 formatında)."},"Receipt":{"type":"object","description":"Fişe ait özet bilgiler ve detay satırları.","properties":{"Detail":{"type":"array","items":{"$ref":"#/components/schemas/QueryReceiptDetail"}},"PaymentBrandUrl":{"type":"string","description":"Kart markasının logo URL'i."},"SchemaName":{"type":"string","description":"Kullanılan kart şemasının adı."},"Approved":{"type":"boolean","description":"İşlemin onaylanıp onaylanmadığını gösterir."}}}}},"QueryReceiptDetail":{"type":"object","properties":{"Key":{"type":"string","description":"Fiş satırının anahtar adı."},"Value":{"type":"string","description":"Fiş satırının değeri."},"ShowCheck":{"type":"boolean","description":"Fiş satırında onay işareti gösterilip gösterilmeyeceği."},"ShowTimes":{"type":"boolean","description":"Fiş satırında çarpım gösterilip gösterilmeyeceği."}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string","description":"Hatanın detayı"},"errorGroup":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.iyzico.com/urunler/ceppos-app2app/app2app-v3/sorgulama.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
