Per-resource invoice apply-eligibility (read-only, context-level).
Decision order: ownership → provider → policy → seller config → external-invoice-exists, then delegates the verdict to the pure `determine_invoice_apply_route`. The endpoint resolves facts; the pure function owns the rules (single home — avoids divergence from the write path `validate_invoice_creation_policy` / `apply_invoice`).
Decision order: ownership → provider → policy → seller config →
external-invoice-exists, then delegates the verdict to the pure
determine_invoice_apply_route. The endpoint resolves facts; the pure
function owns the rules (single home — avoids divergence from the write
path validate_invoice_creation_policy / apply_invoice).
bearer_authAuthorizationBearer <token>referenceType*string"payment_attempt" | "subscription".
referenceId*stringuuidApply eligibility for the referenced resource
application/json- response
Per-resource invoice apply-eligibility (read-only, context-level).
Returned by GET /api/user/bill/invoices/apply-eligibility so the
frontend can gate the Apply Invoice button BEFORE submit. Users consume
this verdict; they do NOT read admin config/policy APIs directly.
canApply*booleanWhether the user can apply for a manual Herald invoice on this resource.
provider?|Resolved payment_provider ("stripe"|"wechat"|"creem"|"apple"|"google"|None).
reason?|Human-readable reason when apply is not available, else None.
referenceId*stringEchoes the queried reference id.
uuidreferenceType*stringEchoes the queried reference type: "payment_attempt" | "subscription".
route*string"external_provider" | "manual_fallback" | "disabled".
curl -X GET 'https://example.com/api/user/bill/invoices/apply-eligibility?referenceType=string&referenceId=497f6eca-6276-4993-bfeb-53cbbbba6f08'{
"canApply": true,
"provider": "string",
"reason": "string",
"referenceId": "8502eb05-558d-4480-8511-c1011710b340",
"referenceType": "string",
"route": "string"
}