---
title: Unlock a paid post
description: Unlock flow for invoice-confirm and pay-with-balance paths.
last_updated: 2026-09-04
meta:
  contentType: how-to
---

# Unlock a paid post

Requires a signed-in session cookie.

## Invoice flow

1. Request an invoice:

```bash
curl -s -b cookies.txt -X POST https://bitsimp.com/api/posts/<postId>/unlock
```

2. Pay `lightning_invoice` out-of-band.
3. Confirm purchase:

```bash
curl -s -b cookies.txt -X POST https://bitsimp.com/api/posts/<postId>/unlock/confirm \
  -H 'content-type: application/json' \
  -d '{"chargeId":"<chargeId>"}'
```

## Balance flow

```bash
curl -s -b cookies.txt -X POST https://bitsimp.com/api/posts/<postId>/unlock \
  -H 'content-type: application/json' \
  -d '{"method":"balance"}'
```

Then poll `GET /api/posts/<postId>` until `isUnlocked` is true.
