Clear Missing Payments
Reset a tenant's unpaid-invoices flag. Reverses any prior
POST /tenants/{tenant}/missing-payments and disengages the
dashboard block immediately.
The endpoint is idempotent: calling it on a tenant that is not
currently flagged returns 200 with has_unpaid_invoices_at: null.
There is no domain-refusal path. Once the tenant id passes route
resolution and the root-tenant guard, the call always succeeds,
including on tenants that have no payment-intent record (the implicit
state is "clear").
Endpoint
DELETE /internal-api/v1/tenants/{tenant}/missing-payments
Required ability
tenants:write
Path parameter
| Parameter | Type | Description |
|---|---|---|
tenant | integer | The customer tenant id. The platform tenant (1) is rejected with 403. |
Body
Empty.
What this does
- Resolves the tenant and refuses with 403 if it is the platform
tenant (id
1). - Sets the tenant's
sign_up_intents.has_unpaid_invoices_atcolumn tonull. Tenants with no payment-intent record skip this step because the implicit state is already "clear". - Returns 200 with the cleared response shape.
The endpoint dispatches no notifications.
Response
Success (200 OK)
{
"data": {
"tenant_id": "2",
"has_unpaid_invoices_at": null,
"dashboard_blocked": false
}
}
| Field | Type | Description |
|---|---|---|
tenant_id | string | Tenant id |
has_unpaid_invoices_at | null | Always null after a successful clear |
dashboard_blocked | bool | Always false after a successful clear |
missing_payment_limit_date is omitted from the clear response.
The field is computed from has_unpaid_invoices_at, so when the
timestamp is null the derived value has no meaningful semantics.
The API drops the key rather than emit a misleading datetime.
Examples
Clear a marked tenant
curl -X DELETE "https://app.publica.la/internal-api/v1/tenants/2/missing-payments" \
-H "Authorization: Bearer <id>|pla_int_<secret>" \
-H "Accept: application/json"
Clear an already-clear tenant (no-op)
Returns the same 200 body. Safe to retry.
curl -X DELETE "https://app.publica.la/internal-api/v1/tenants/2/missing-payments" \
-H "Authorization: Bearer <id>|pla_int_<secret>" \
-H "Accept: application/json"
Error Handling
401 Unauthenticated
Missing Bearer, only X-User-Token sent, or revoked token.
403 Missing ability
{
"message": "Invalid ability provided."
}
The token does not carry tenants:write.
403 Root tenant
{
"message": "Operations on the root tenant are not allowed via internal-api."
}
The path resolved to the platform tenant. Use a customer tenant id.
404 Tenant not found
{
"message": "Not found"
}
{tenant} does not resolve to any tenant. Also returned when the
request resolves to a non-platform host, or when
X-Farfalla-Tenant-Id is set to a non-platform tenant id on
app.publica.la.
429 Rate limited
HTTP/1.1 429 Too Many Requests
Retry-After: <seconds>
{
"message": "Too Many Attempts."
}
The token has spent its 60 RPM budget.
See also
- Mark Missing Payments -
POSTto set the flag - Tenants Overview - resource overview, route shapes
- Internal API v1 Overview - auth, abilities, errors