---
title: "Withdraw from a purchase and get the refund (CRD Art 11a)"
method: POST
path: "/v1/billing/withdrawals"
tags: ["Billing"]
---

# Withdraw from a purchase and get the refund (CRD Art 11a)

`POST /v1/billing/withdrawals`

## Request

- Base URL: `https://api.lizzflix.xyz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.lizzflix.xyz/v1/billing/withdrawals`
- Auth: none declared

## Request body

- WithdrawalBody
  - `purchaseId` string, required
  - `confirm` boolean, required
  - `statementVersion` string
  - `surface` 'web' | 'ios' | 'android'

## Response `201`

Withdrawn and refunded

- object
  - `withdrawal` BillingRefund, required
    - `id` string, required
    - `kind` 'withdrawal' | 'admin', required
    - `purchaseKind` 'topup' | 'plan', required
    - `purchaseId` string, nullable, required
    - `status` 'pending' | 'succeeded' | 'failed', required
    - `refundCents` number, required
    - `amountPaidCents` number, nullable, required
    - `currency` string, nullable, required
    - `providedShare` number, nullable, required
    - `clawedBackCredits` number, required
    - `reason` string, nullable, required
    - `createdAt` string, required
    - `completedAt` string, nullable, required

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `404`: No such purchase
- `409`: Not possible now (window closed, already withdrawn, generation running)
- `502`: Stripe refused; the credits are back and a retry is possible (a plan already ended stays ended). With reason refund_pending Stripe has not confirmed the refund yet: the credits stay taken back until the 6-hourly maintenance cron settles it from Stripe's records.

---

[API](https://skmtc.dev/lizzflix/apis/lizzflix-api.md) · [All operations](https://skmtc.dev/lizzflix/apis/lizzflix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lizzflix/apis/lizzflix-api/revisions/4536ce9d80ff?raw)
