# Refund / Cancel

This service checks whether the transaction is eligible for cancellation or refund, and then returns the `deeplink_url` and the `encryption_key`. To send a request to this service, a mobile session token (`session_key`) must be used.

## POST /v1/softpos/init\_reversal\_transaction

> Initiate Cancel / Refund

```json
{"openapi":"3.0.3","info":{"title":"PayPOS (Paynet) API","version":"1.0.0"},"tags":[{"name":"SoftPOS"}],"servers":[{"url":"https://api.paynet.com.tr","description":"Production"},{"url":"https://pts-api.paynet.com.tr","description":"Sandbox"}],"paths":{"/v1/softpos/init_reversal_transaction":{"post":{"summary":"Initiate Cancel / Refund","tags":["SoftPOS"],"parameters":[{"name":"Session-Key","in":"header","required":true,"description":"Mobile session key","schema":{"type":"string"}},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitReversalRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitReversalResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"description":"Content type.","schema":{"type":"string"}}},"schemas":{"InitReversalRequest":{"type":"object","required":["xact_id"],"properties":{"xact_id":{"type":"string","description":"The encrypted version of the transaction ID."},"reference_no":{"type":"string","description":"Reference number."},"callback_url":{"type":"string","description":"Callback url.","nullable":true}}},"InitReversalResponse":{"type":"object","properties":{"payment_session_id":{"type":"string","description":"Payment session id."},"deeplink_url":{"type":"string","description":"Deeplink url."},"encryption_key":{"type":"string","description":"encryption key."},"object_name":{"type":"string","description":"Object name."},"code":{"type":"integer","description":"Code."},"message":{"type":"string","description":"Message."}}},"ErrorResponse":{"type":"object","properties":{"object_name":{"type":"string","description":"Object name."},"code":{"type":"integer","description":"Code."},"message":{"type":"string","description":"Message."}}}}}}
```


---

# 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/paypos-app2app/paypos-app2app-integration/refund-cancel.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.
