> For the complete documentation index, see [llms.txt](https://docs.radfi.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.radfi.co/dev/api-endpoints/refund.md).

# Refund

## POST /api/refund

> Create refund transaction

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"servers":[{"url":"https://api.radfi.co","description":"Production"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateRefundDto":{"type":"object","properties":{"type":{"type":"string","enum":["virtual_mint"]},"runeIds":{"description":"require if refund type is \"virtual_mint\"","type":"array","items":{"type":"string"}},"userAddress":{"type":"string"}},"required":["type","userAddress"]}}},"paths":{"/api/refund":{"post":{"operationId":"RefundController_create","summary":"Create refund transaction","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundDto"}}}},"responses":{"201":{"description":""}},"tags":["Refund"]}}}}
```

## POST /api/refund/sign

> Sign refund transaction

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"servers":[{"url":"https://api.radfi.co","description":"Production"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"BroadcastRefundDto":{"type":"object","properties":{"base64Psbt":{"type":"string"},"userAddress":{"type":"string"}},"required":["base64Psbt","userAddress"]}}},"paths":{"/api/refund/sign":{"post":{"operationId":"RefundController_signAndBroadcast","summary":"Sign refund transaction","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastRefundDto"}}}},"responses":{"201":{"description":""}},"tags":["Refund"]}}}}
```

## GET /api/refund/calculate

> calculate refund amount

```json
{"openapi":"3.0.0","info":{"title":"Radfi API","version":"1.0"},"servers":[{"url":"https://api.radfi.co","description":"Production"}],"paths":{"/api/refund/calculate":{"get":{"operationId":"RefundController_calculate","summary":"calculate refund amount","parameters":[{"name":"type","required":true,"in":"query","schema":{"enum":["virtual_mint"],"type":"string"}},{"name":"runeIds","required":false,"in":"query","description":"require if refund type is \"virtual_mint\"","schema":{"type":"string"}},{"name":"userAddress","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Refund"]}}}}
```
