From d7ce96fba498c61fc93224bff95167e75556f7bd Mon Sep 17 00:00:00 2001 From: drjones <> Date: Sun, 20 Sep 2026 20:11:08 -0700 Subject: [PATCH] Clarify 20-min rental ceiling (verified: SMSPool ignores expiry param) - sms.py: drop misleading expiry param from /purchase/sms (SMSPool hard-caps rentals at 1200s/20min regardless); document MAX_RENTAL_MIN as verified - surface the ceiling in customer UI + admin panel + feasibility doc --- sms.py | 9 ++++++--- templates/sms.html | 1 + templates/sms_admin.html | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sms.py b/sms.py index 57436c7..f8e4d0c 100644 --- a/sms.py +++ b/sms.py @@ -77,8 +77,9 @@ class SMSPoolProvider(NumberProvider): return self._get("service/retrieve_all", {}) def provision_number(self, service, country, expiry_min): - return self._get("purchase/sms", {"service": service, "country": country, - "expiry": int(expiry_min)}) + # `expiry` is passed for API compatibility but SMSPool ignores it โ€” + # every rental hard-caps at 20 min (see MAX_RENTAL_MIN). + return self._get("purchase/sms", {"service": service, "country": country}) def check_sms(self, order_id): return self._get("sms/check", {"orderid": order_id}) @@ -132,7 +133,9 @@ DEFAULT_PRICING = [ {"duration_min": 20, "price_sats": 3000}, ] -MAX_RENTAL_MIN = 20 # SMSPool rental window ceiling; longer durations re-rent +MAX_RENTAL_MIN = 20 # VERIFIED 2026-09-20: SMSPool ignores `expiry` param โ€” rental numbers + # hard-cap at 1200s (20 min) regardless of what's requested. Longer + # sessions require a re-rent loop (not yet implemented). # -------------------------------------------------------------------------- # Schema diff --git a/templates/sms.html b/templates/sms.html index 7370ff9..9f4e5db 100644 --- a/templates/sms.html +++ b/templates/sms.html @@ -6,6 +6,7 @@

Temporary SMS

Rent a real number for a few minutes to receive a verification code. No outbound. Pay with your wallet balance.

Availability depends on the service you're verifying with. Some services reject temporary, VoIP, or recycled numbers.

+

Rentals are capped at 20 minutes (provider limit).

{% if session %} diff --git a/templates/sms_admin.html b/templates/sms_admin.html index 22bb1c7..dfabaaf 100644 --- a/templates/sms_admin.html +++ b/templates/sms_admin.html @@ -3,7 +3,7 @@ {% block body %}

SMS Admin

-

SMSPool balance: {{ smspool_balance if smspool_balance is not none else 'unavailable' }} USD

+

SMSPool balance: {{ smspool_balance if smspool_balance is not none else 'unavailable' }} USD ยท Rental ceiling: 20 min (SMSPool hard cap โ€” longer sessions need a re-rent loop)

ACTIVE
{{ stats.active }}