> For the complete documentation index, see [llms.txt](https://aplazo.gitbook.io/aplazo-integrations/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aplazo.gitbook.io/aplazo-integrations/api-reference/in-store-api/request-a-refund.md).

# Request a refund

## Environment

{% tabs %}
{% tab title="Development" %}
<https://api.aplazo.net>
{% endtab %}

{% tab title="Production" %}
<https://api.aplazo.mx>
{% endtab %}
{% endtabs %}

## Refund Payment

> Initiates a refund for a payment using the cartId.

```json
{"openapi":"3.0.3","info":{"title":"Aplazo In-Store Payments API","version":"1.0.0"},"servers":[{"url":"https://api.aplazo.net"}],"security":[{"apiKeyAuth":[]},{"merchantIdAuth":[]}],"components":{"securitySchemes":{}},"paths":{"/api/pos/loan/refund":{"post":{"summary":"Refund Payment","description":"Initiates a refund for a payment using the cartId.","operationId":"refundPayment","tags":["Refunds"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["cartId","totalAmount","reason"],"properties":{"cartId":{"type":"string","description":"Merchant ID for the cart."},"totalAmount":{"type":"number","format":"float","description":"Amount to refund.","minimum":0},"reason":{"type":"string","description":"Reason for the refund.","minLength":1}}}}}},"responses":{"200":{"description":"Refund request processed successfully.","content":{"application/json":{"schema":{"type":"object","required":["refundId","merchantId","cartId","refundStatus","refundDate"],"properties":{"refundId":{"type":"integer","description":"Aplazo identifier for the refund request."},"merchantId":{"type":"integer","description":"Aplazo merchant ID."},"cartId":{"type":"string","description":"Cart ID from the merchant system."},"refundStatus":{"type":"string","description":"Status of the refund request.","enum":["REQUESTED","REFUNDED"]},"refundDate":{"type":"string","format":"date-time","description":"Date of the refund request."}}}}}}}}}}}
```
