You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/billing/RUNBOOKS.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,24 @@ Operational runbooks for the billing module. Each runbook references real endpoi
22
22
```
23
23
4. Gather evidence in Stripe Dashboard: usage records, signup email, ToS acceptance timestamp, IP logs.
24
24
5. Submit evidence before day 7 via Stripe Dashboard → Dispute → Submit evidence.
25
-
6. If dispute won (`charge.dispute.funds_reinstated` received): verify the extras credit was re-applied by re-checking the ledger via `GET /api/admin/billing/customer/:orgId`.
25
+
6. If dispute won (`charge.dispute.funds_reinstated` received): restore the customer's extras balance via:
26
+
```
27
+
POST /api/admin/billing/dispute/credit/:orgId
28
+
Body: {
29
+
"chargeId": "ch_xxx",
30
+
"amountCents": <dispute_amount_cents>,
31
+
"reason": "dispute won — funds reinstated on charge ch_xxx",
32
+
"refundRequestId": "<uuid>"
33
+
}
34
+
```
35
+
Example curl:
36
+
```bash
37
+
curl -X POST https://api.trawl.me/api/admin/billing/dispute/credit/<orgId> \
38
+
-H "Authorization: Bearer $ADMIN_JWT" \
39
+
-H "Content-Type: application/json" \
40
+
-d '{"chargeId":"ch_xxx","amountCents":2000,"reason":"dispute won — Stripe reinstated funds","refundRequestId":"<uuid>"}'
41
+
```
42
+
Confirm credit applied: `GET /api/admin/billing/customer/:orgId` — check ledger for an `adjustment` entry with `refId: dispute-credit-<uuid>`.
26
43
7. If dispute lost: extras balance debited by `charge.dispute.funds_withdrawn` is not refunded — log in incident tracker.
0 commit comments