---
title: "Refund latest purchase"
method: POST
path: "/premium/refund-latest"
tags: ["Billing"]
---

# Refund latest purchase

`POST /premium/refund-latest`

Refunds the authenticated user's most recent paid invoice if it is within 3 days and the user is not in a 30-day cooldown. If the invoice was tied to a subscription, the subscription is cancelled immediately.

## Response `200`

Success

- SelfServeRefundResponse
  - `invoice_id` string, required
  - `payment_intent_id` string, nullable, required
  - `charge_id` string, nullable, required
  - `refund_id` string, nullable, required
  - `refunded_amount_cents` integer, required — Amount actually refunded so far, in the currency minor unit; 0 until the provider confirms success
  - `invoice_amount_paid_cents` integer, required
  - `currency` string, required
  - `subscription_id` string, nullable, required — Subscription that was cancelled along with the refund, when applicable
  - `status` string, nullable, required — Provider status of the refund (e.g. pending, succeeded, failed); money only moved once succeeded

## Other responses

- `400` — Bad Request - The request was malformed or contained invalid data
- `401` — Unauthorized - Authentication is required or the token is invalid
- `403` — Forbidden - You do not have permission to perform this action
- `429` — Too Many Requests - You are being rate limited
- `500` — Internal Server Error - An unexpected error occurred

---

[API](https://skmtc.dev/fluxer/apis/fluxer-api.md) · [All operations](https://skmtc.dev/fluxer/apis/fluxer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fluxer/fluxer-api/revisions/d9c706133cc5/schema)
