> 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/espanol/referencia-de-api/online-api/solicita-un-reembolso.md).

# Solicita un reembolso

## Environments

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

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

{% openapi src="/files/9LjWj62EfrRCRGt9S68y" path="/loan/refund-from-cart" method="post" %}
[openapi3\_20250109.yaml](https://content.gitbook.com/content/UR1kwlS8DiKsSq3rCVB5/blobs/hZMypjMkbiYLv5efPBB0/openapi3_20250109.yaml)
{% endopenapi %}

## Response Examples

### Success

<details>

<summary><mark style="color:green;">200</mark> - Successfully requested a refund</summary>

{% code overflow="wrap" %}

```bash
curl --location 'https://merchant.aplazo.net/api/loan/refund-from-cart' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token here>' \
--data '{    
    "cartId":  "3201" ,    
    "totalAmount": 150,    
    "reason":  "Wrong shoe size"
}'
```

{% endcode %}

```json
{
    "refundId": 25759,
    "merchantId": 2633,
    "cartId": "3201",
    "refundStatus": "REQUESTED",
    "refundDate": "2025-01-06T18:13:31.406721093"
}
```

</details>

### Errors

<details>

<summary><mark style="color:red;">500</mark> - Cart not found</summary>

{% code overflow="wrap" %}

```bash
curl --location 'https://merchant.aplazo.net/api/loan/refund-from-cart' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token here>' \
--data '{    
    "cartId":  "non-existant-cart" ,    
    "totalAmount": 150,    
    "reason":  "Refund_reason"
}'
```

{% endcode %}

```json
{
    "timestamp": "2025-01-06T18:20:20.811+00:00",
    "status": 500,
    "error": "Internal Server Error",
    "message": "",
    "path": "/api/loan/refund-from-cart"
}
```

</details>
