ENGINEERING NOTE 08 / 50 · SMS

Treat an SMS quote as expiring data

OPEN RAMBO ·

An available number count is a snapshot, not a reservation. Recheck price and availability before committing a purchase and explain any change before charging.

Published by OPEN RAMBO. The engineering patterns and pseudocode illustrate designs, not a documented product API. Numerical examples are illustrative.

Bind a quote to its context

A quote should identify service, country, product option, currency and expiry. Use a server-generated reference rather than trusting a client-supplied price. If the chosen option changes, invalidate the quote rather than reusing a cheaper previous amount.

Handle the allocation gap

Even a fresh availability check cannot guarantee stock will remain at allocation time. Model out-of-stock after quote as a normal branch. If money was reserved, release that reservation once the final failure is known; do not leave it as a successful purchase.

Show meaningful changes

If price rises, ask the customer to accept the new quote through the purchase flow. If only a display count changes while price and selection stay valid, avoid unnecessary friction. Keep the accepted quote version with the order for later disputes and reconciliation.

Illustrative implementation

quote = {"id":"q-demo", "service":"example",
         "currency":"USD", "amount_minor":35, "expires_at":expiry}
# Server validates quote again before purchase.

Acceptance check

Simulate inventory disappearing and price changing between quote and purchase. Verify there is no silent overcharge.

Read next