Summary
Two related enhancements to the payment system:
1. Zero-cost PaymentCondition (membership gate)
A PaymentCondition with "amount": "0" should grant access if the user has a balance — without deducting anything. This acts as a membership check: "prove you have funds."
Currently amount: 0 skips the balance check and always returns 402. Fix: check that a balance entry exists and grant access.
{
"acl:condition": {
"@type": "PaymentCondition",
"amount": "0",
"currency": "sats"
}
}
2. Balance-based rate limits
Users with a balance get relaxed rate limits. Spammers won't deposit real sats to abuse the API.
- No balance — default rate limits (strict)
- Has balance — relaxed (e.g. 2x)
- Higher balance — more relaxed (e.g. 10x)
This makes the payment system double as an anti-spam / trust layer.
Design question
For the zero-cost gate: should balance >= 0 (has an account) or balance > 0 (has actual funds) be the requirement?
Summary
Two related enhancements to the payment system:
1. Zero-cost PaymentCondition (membership gate)
A
PaymentConditionwith"amount": "0"should grant access if the user has a balance — without deducting anything. This acts as a membership check: "prove you have funds."Currently
amount: 0skips the balance check and always returns 402. Fix: check that a balance entry exists and grant access.{ "acl:condition": { "@type": "PaymentCondition", "amount": "0", "currency": "sats" } }2. Balance-based rate limits
Users with a balance get relaxed rate limits. Spammers won't deposit real sats to abuse the API.
This makes the payment system double as an anti-spam / trust layer.
Design question
For the zero-cost gate: should
balance >= 0(has an account) orbalance > 0(has actual funds) be the requirement?