# Approval

In the marketplace solution, once the payment has been processed by iyzico, the funds are securely held in a protected pool until the submerchant grants approval for the payment breakdown or specific product. During this period, the submerchant has the flexibility to cancel the payment, issue a refund for a particular item, or provide approval for the fund transfer if the product has been successfully delivered to the buyer and the transaction has been completed without any issues. Additionally, the submerchant can withdraw their approval for the transaction if necessary.&#x20;

For such usages iyzico offers 2 ways of finalize the payment;

* [Approve](#approve)
* [Disapprove](#disapprove)

{% hint style="info" %}
Please note that iyzico does not have the capability to grant product approvals. Since there is no corresponding function available in the control panel, these approvals must be sent programmatically at the code level.
{% endhint %}

## Approve Item

> To approve an item, provide the split id (\*\*paymentTransactionId\*\*). The id is returned by the payment service.

```json
{"openapi":"3.0.3","info":{"title":"Marketplace - Submerchant Create & Update - Approve","version":"1.3.3"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/payment/iyzipos/item/approve":{"post":{"summary":"Approve Item","description":"To approve an item, provide the split id (**paymentTransactionId**). The id is returned by the payment service.","tags":["Marketplace"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemApproveRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemActionResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header; a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Request body content type."}},"schemas":{"ItemApproveRequest":{"type":"object","required":["paymentTransactionId"],"properties":{"locale":{"type":"string","enum":["tr","en"]},"conversationId":{"type":"string"},"paymentTransactionId":{"type":"string","description":"Split id to be approved."}}},"ItemActionResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"]},"locale":{"type":"string","enum":["tr","en"]},"systemTime":{"type":"integer"},"conversationId":{"type":"string"},"paymentTransactionId":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["failure"]},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"locale":{"type":"string","enum":["tr","en"]},"systemTime":{"type":"integer"},"conversationId":{"type":"string"}}}}}}
```

#### 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/approve.php">PHP</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-java/blob/master/src/test/java/com/iyzipay/sample/ApproveSample.java">Java</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-dotnet/blob/master/Iyzipay.Samples/ApproveSample.cs">.Net</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-node/blob/master/samples/IyzipaySamples.js#L38">Node.Js</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-python/blob/master/samples/approve.py">Python</a></td></tr><tr><td><a href="https://www.postman.com/iyzico/iyzico/request/ic384ys/1-3-1-approve-payment">Postman</a></td></tr></tbody></table>

## Dissapprove

> To disapprove a product, the related paymentTransactionId must be provided in the request. The id (paymentTransactionId) of the disapproved payment transaction will be returned in the response.

```json
{"openapi":"3.0.3","info":{"title":"Marketplace - Submerchant Create & Update - Approve","version":"1.3.3"},"servers":[{"url":"https://api.iyzipay.com","description":"iyzico API"}],"paths":{"/payment/iyzipos/item/disapprove":{"post":{"summary":"Dissapprove","description":"To disapprove a product, the related paymentTransactionId must be provided in the request. The id (paymentTransactionId) of the disapproved payment transaction will be returned in the response.","tags":["Marketplace"],"parameters":[{"$ref":"#/components/parameters/AuthHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDisapproveRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemActionResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthHeader":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Authorization header; a signed hash value that starts with **IYZWSv2** and is generated in Base64 format."},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Request body content type."}},"schemas":{"ItemDisapproveRequest":{"type":"object","required":["paymentTransactionId"],"properties":{"locale":{"type":"string","enum":["tr","en"]},"conversationId":{"type":"string"},"paymentTransactionId":{"type":"string","description":"Split id whose approval will be revoked."}}},"ItemActionResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","failure"]},"locale":{"type":"string","enum":["tr","en"]},"systemTime":{"type":"integer"},"conversationId":{"type":"string"},"paymentTransactionId":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["failure"]},"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"locale":{"type":"string","enum":["tr","en"]},"systemTime":{"type":"integer"},"conversationId":{"type":"string"}}}}}}
```

#### 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/disapprove.php">PHP</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-java/blob/master/src/test/java/com/iyzipay/sample/DisapproveSample.java">Java</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-dotnet/blob/master/Iyzipay.Samples/DisapproveSample.cs">.Net</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-node/blob/master/samples/IyzipaySamples.js#L52">Node.Js</a></td></tr><tr><td><a href="https://github.com/iyzico/iyzipay-python/blob/master/samples/disapprove.py">Python</a></td></tr><tr><td><a href="https://www.postman.com/iyzico/iyzico/request/h2qa3i2/1-3-2-disapprove-payment">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/products/marketplace/marketplace-implementation/approval.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.
