> For the complete documentation index, see [llms.txt](https://developer-eng.esnekpos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer-eng.esnekpos.com/esnekpos-developer-environment/marketplace-integration/extradition-request.md).

# Extradition request

#### Marketplace Return Request Service Request Mode&#x6C;**;**

<table><thead><tr><th width="107.33333333333331">Method</th><th width="502">API URL</th><th>Parameter</th></tr></thead><tbody><tr><td>POST</td><td>https://posservice.esnekpos.com/api/services/OrderReturn</td><td>JSON File</td></tr></tbody></table>

#### SubMerchantDetails field must be filled to specify which store's payment should be refunded in the refund request.

### The parameters to be sent to the service are as follows;

<table><thead><tr><th width="214">Parameters</th><th width="87">Type</th><th width="73">Compoltye</th><th>Description</th></tr></thead><tbody><tr><td>MERCHANT</td><td>string</td><td>Yes</td><td>It is a unique credential created specifically for the merchant (Marketplace).</td></tr><tr><td>MERCHANT_KEY</td><td>string</td><td>Yes</td><td>It is the key information created specifically for the merchant (Marketplace).</td></tr><tr><td>ORDER_REF_NUMBER</td><td>int</td><td>Yes</td><td>It is the reference number information given by the merchant (Marketplace) when sending the payment transaction request. The payment transaction to be canceled is matched with the reference number of the relevant merchant, and the transaction is carried out.</td></tr><tr><td>AMOUNT</td><td>string</td><td>Yes</td><td>It is the Cancellation/Refund amount information of the reference number to be processed.</td></tr><tr><td>EXTERNAL_ID</td><td>string</td><td>Yes</td><td>It is the ID information in the marketplace (merchant) system of the store (submerchant). This information is assigned by the marketplace.</td></tr><tr><td>AMOUNT</td><td>string</td><td>Yes</td><td>It is the amount information to be deducted from the store (submerchant).</td></tr></tbody></table>

### Here is a sample JSON file to send to the service;

```json
                                            
{
    "MERCHANT": "TEST1234",
    "MERCHANT_KEY": "4oK26hK8MOXrIV1bzTRVPA==",
    "ORDER_REF_NUMBER": "412",
    "AMOUNT": "5",
    "SubMerchantDetails":[{  
      "EXTERNAL_ID":"EXTERNAL_ID1",
      "AMOUNT":"5.00" 
     }]
}
                                        
```

### Marketplace Return Request Service Reply Messag&#x65;**;**

#### The parameters of the reply message sent from the service after the transaction are as follows;

<table><thead><tr><th width="224">Parameters</th><th width="119">Type</th><th width="102">Compulsory</th><th>Description</th></tr></thead><tbody><tr><td>RETURN_CODE</td><td>string</td><td>Yes</td><td>The status of the return process is the code information.</td></tr><tr><td>RETURN_MESSAGE</td><td>string</td><td>Yes</td><td>The status of the return process is the code information.</td></tr><tr><td>STATUS</td><td>string</td><td>Yes</td><td>The result of the return process is the status information.</td></tr><tr><td>ORDER_REF_NUMBER</td><td>string</td><td>Yes</td><td>It is the reference number information given for the request in the payment request by the merchant (Marketplace).</td></tr><tr><td>REFNO</td><td>string</td><td>Yes</td><td>It is the reference number information given by the Esnekpos system for the return transaction.</td></tr></tbody></table>

```json
                                            
{
    "RETURN_CODE": "00",
    "RETURN_MESSAGE": "₺5,00 iade talebiniz alınmıştır.",
    "STATUS": "ORDER_CANCEL",
    "ORDER_REF_NUMBER": 412,
    "REFNO": null
}
                                        
```

Returning the value of STATUS parameter to ORDER\_CANCEL and RETURN\_CODE parameter to 0 in the marketplace return request response message indicates that the confirmation process was successful.
