# Refund

It is used for cancellation, refund, or partial refund of successful credit card transactions. The important thing here is date of the transaction. All amount will be cancelled if transactions made on the same day. For the past transactions, you can be refund or partial refund. Partial refund is not possible for same-day transactions.

{% hint style="success" %}
<https://api.paynet.com.tr/v1/transaction/reversed\\_request>
{% endhint %}

{% tabs %}
{% tab title="Request Parameters" %}

| Parameter Name | Type   | Required | Description                                                                                                                                                                                                                      |
| -------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **xact\_id**   | string | Yes      | Paynet Transaction Number.                                                                                                                                                                                                       |
| **amount**     | string | No       | The amount will be refunded. The amount to be refunded multiplied by one hundred. “10.00 TL” should be send as “1000” (“10.00 TL” => “1000”) . If it is not sent or “0” is sent, then all of the transaction amount is refunded. |
| **succeedUrl** | string | No       | When the refund request is approved or disapproved , a post for its status is made to succedUrl.                                                                                                                                 |

{% endtab %}

{% tab title="Response Parameters" %}

| Parameter Name   | Type   | Description                                                                                                |
| ---------------- | ------ | ---------------------------------------------------------------------------------------------------------- |
| **object\_name** | string | The object name of response API.                                                                           |
| **code**         | string | The code of response result. [Expr](https://doc.paynet.com.tr/genel-bilgiler/hata-kodlari/doenues-kodlari) |
| **message**      | string | Response result message.                                                                                   |
| {% endtab %}     |        |                                                                                                            |

{% tab title="Request" %}

```
{
xact_id: "xk_EAAAAAh7VYf9HG4+GR9ezqiMWAA8PY6P4eroE4BUUHRCLxGO"
}
```

{% endtab %}

{% tab title="Response" %}

```
{  
   "object_name":"transaction_reversed_request",
   "message":"Başarılı İşlem",
   "code":0
}
```

{% endtab %}

{% tab title="Service URL" %}

| System          | URL                                                                |
| --------------- | ------------------------------------------------------------------ |
| **Live System** | <https://api.paynet.com.tr/v1/transaction/reversed\\_request>      |
| **Test System** | ​<https://pts-api.paynet.com.tr/v1/transaction/reversed\\_request> |
| {% endtab %}    |                                                                    |
| {% endtabs %}   |                                                                    |

**Parameters that posted to succedUrl**

In the case of approval or disapproval of the requested transaction with the request from the refund transaction service, it is posted as JSON to the address that specified in succeedUrl parameter of the refund transaction service.

**Request Parameters**

| **Parameter Name** | Type   | Description                                                                                                                       |
| ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------- |
| **xact\_id**       | string | Paynet transaction number of the refund transaction.                                                                              |
| **code**           | string | Result code of the refund transaction. 0: refund/cancellation request is approved, 1: refund/cancellation request is disapproved. |
| **status**         | string | The status of refund transaction.                                                                                                 |
| **message**        | string | The note about refund transaction result.                                                                                         |
