# Retrieve Payment

Details of a transaction recorded in iyzico can be queried later. The payment retrieve service can be used for this.

The parameters that need to be sent to the service are as follows:

## Retrieve Payment Result

> Retrieves the result of a payment.

```json
{"openapi":"3.0.3","info":{"title":"NON3D","version":"1.0.0"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/payment/detail":{"post":{"summary":"Retrieve Payment Result","description":"Retrieves the result of a payment.","tags":["Non3D Payment"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["paymentId"],"properties":{"locale":{"type":"string","description":"Language code. Allowed values; tr, en. Default; tr","enum":["tr","en"]},"paymentId":{"type":"string","description":"Payment transaction ID."},"paymentConversationId":{"type":"string","description":"ConversationId of the payment transaction. Required if paymentId is not sent."}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponseTwo"}}}},"400":{"description":"Invalid request / validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"description":"Authorization header starting with IYZWSv2 and a signed hash value encoded in base64.","schema":{"type":"string"}},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"description":"Content-Type value.","schema":{"type":"string"}}},"schemas":{"PaymentResponseTwo":{"type":"object","properties":{"status":{"type":"string","description":"Indicates the result of the request.","enum":["success","failure"]},"locale":{"type":"string","description":"Response language (tr/en)."},"systemTime":{"type":"integer","description":"Operation time (epoch ms)."},"conversationId":{"type":"string","description":"ID matching the request."},"price":{"type":"decimal","description":"Basket total amount."},"paidPrice":{"type":"decimal","description":"Total collected amount."},"installment":{"type":"integer","description":"Installment count."},"paymentId":{"type":"string","description":"Payment ID."},"fraudStatus":{"type":"integer","description":"Payment status per fraud filters. If the risk score is low, the payment is approved instantly; if high, the payment is declined. The merchant should ship products only for transactions with value 1; for 0, the merchant should wait for notification.\n - 1: Approved\n - 0: Under review\n - -1: Declined\n","enum":[0,-1,1]},"merchantCommissionRate":{"type":"decimal","description":"Merchant's applied installment/commission rate. For example, if price=100 and paidPrice=110, the merchant rate is 10%. Informational."},"merchantCommissionRateAmount":{"type":"decimal","description":"Merchant's commission amount. For example, if price=100 and paidPrice=110, the commission is 10. Informational."},"iyziCommissionRateAmount":{"type":"decimal","description":"iyzico transaction commission amount."},"iyziCommissionFee":{"type":"decimal","description":"iyzico transaction fee."},"cardType":{"type":"string","description":"Card type.","enum":["CREDIT_CARD","DEBIT_CARD","PREPAID_CARD"]},"cardAssociation":{"type":"string","description":"Card association.","enum":["VISA","MASTER_CARD","AMERICAN_EXPRESS","TROY"]},"cardFamily":{"type":"string","description":"Card family.","enum":["Bonus","Axess","World","Maximum","Paraf","CardFinans"]},"binNumber":{"type":"string","description":"BIN (first 8 digits)."},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card."},"basketId":{"type":"string","description":"Basket ID."},"currency":{"type":"string","description":"Currency.","enum":["TRY","USD","EUR","NOK","CHF","GBP"]},"itemTransactions":{"type":"array","description":"Payment line items for basket entries.","items":{"type":"object","properties":{"paymentTransactionId":{"type":"string","description":"ID of the payment breakdown. Must be stored by the merchant. Used for refund/approve/disapprove operations and communication with iyzico. Preferably stored in relation with itemId."},"itemId":{"type":"string","description":"ID of the item in the basket provided by the merchant."},"price":{"type":"decimal","description":"Amount of the item in the merchant's basket."},"paidPrice":{"type":"decimal","description":"Distributed collected amount per breakdown. Must be stored by the merchant."},"transactionStatus":{"type":"integer","description":"Status of the payment breakdown.\n- 0: In fraud control\n- -1: Declined after fraud control\n- 1: Approved (Marketplace: Waiting for Merchant Approval)\n- 2: Approved (Marketplace Approval Given)\n","enum":[0,-1,1,2]},"blockageRate":{"type":"decimal","description":"Merchant blockage rate per breakdown."},"blockageRateAmountMerchant":{"type":"decimal","description":"Portion of the blockage amount reflected to the merchant."},"blockageRateAmountsubMerchant":{"type":"decimal","description":"Sub-merchant blockage amount per breakdown."},"blockageResolvedDate":{"type":"string","description":"Blockage release date per transaction. Format yyyy-MM-dd HH:mm:ss, e.g. 2015-10-19 14:36:52."},"iyziCommissionFee":{"type":"decimal","description":"iyzico transaction fee distributed per breakdown."},"iyziCommissionRateAmount":{"type":"decimal","description":"iyzico commission amount distributed per breakdown."},"merchantCommissionRate":{"type":"decimal","description":"Merchant commission rate distributed per breakdown."},"merchantCommissionRateAmount":{"type":"decimal","description":"Merchant commission amount distributed per breakdown."},"merchantPayoutAmount":{"type":"decimal","description":"Amount to be sent to the merchant after fees, commissions and blockages are deducted for this breakdown."},"subMerchantPrice":{"type":"decimal","description":"Sub-merchant entitlement."},"subMerchantPayoutRate":{"type":"string","description":"Rate of the amount to be sent to the sub-merchant."},"subMerchantPayoutAmount":{"type":"decimal","description":"Amount to be transferred to the sub-merchant."},"convertedPayout":{"type":"object","description":"Post-conversion calculations per breakdown.","properties":{"paidPrice":{"type":"decimal","description":"Distributed collected amount per breakdown. Must be stored by the merchant."},"iyziCommissionFee":{"type":"decimal","description":"iyzico transaction fee distributed per breakdown."},"iyziCommissionRateAmount":{"type":"decimal","description":"iyzico commission amount distributed per breakdown."},"blockageRateAmountMerchant":{"type":"decimal","description":"Portion of blockage amount reflected to the merchant."},"blockageRateAmountSubMerchant":{"type":"string"},"subMerchantPayoutAmount":{"type":"string"},"merchantPayoutAmount":{"type":"decimal","description":"Amount to be sent to the merchant after fees, commissions and blockages are deducted for this breakdown."},"iyziConversationRate":{"type":"decimal","description":"Exchange rate."},"iyziConversationRateAmount":{"type":"decimal","description":"Amount after applying the exchange rate."}}}}}},"authCode":{"type":"string","description":"Auth code returned by the bank."},"phase":{"type":"string","description":"Payment phase."},"hostReference":{"type":"string","description":"Host reference value given by the bank for the payment."},"signature":{"type":"string","description":"Signature value that can be used for signature verification."},"paymentStatus":{"type":"string","description":"Shows the result of the payment process.","enum":["SUCCESS","FAILURE","INIT_THREEDS","CALLBACK_THREEDS"]}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","description":"Success/failure info."},"errorCode":{"type":"string","description":"Error code."},"errorMessage":{"type":"string","description":"Error message."},"errorGroup":{"type":"string","description":"Error group."},"locale":{"type":"string","description":"Language code."},"systemTime":{"type":"integer","description":"System time."},"conversationId":{"type":"string","description":"Request/response matching ID."}}}}}}
```

#### Sample Codes

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><a href="https://github.com/iyzico/iyzipay-php/blob/master/samples/retrieve_payment_result.php">PHP</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-java/blob/master/src/test/java/com/iyzipay/sample/PaymentSample.java#L324">Java</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-dotnet/blob/master/Iyzipay.Samples/PaymentSample.cs#L586">.NET</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-node/blob/master/samples/IyzipaySamples.js#L985">Node.js</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-python/blob/master/samples/retrieve_payment_result.py">Python</a></td></tr><tr><td><a href="https://www.postman.com/iyzico/iyzico/request/l0kyutg/2-2-retrieve-payment-result">Postman</a></td></tr></tbody></table>


---

# 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/en/advanced/retrieve-payment.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.
