Confirming bookings, check-ins and deliveries with an SMS code

WhatsApp & APIs·· 16 views· 3 min read

The short answer: an SMS code confirms that the person making the booking, checking in or receiving the order is really the one who asked for it. What needs care here is timing: a code is valid for 60 minutes at most, so you send it close to the moment it will be used, not on the day the booking was made.

Three uses and when to send the code

Use When to send Who checks
Confirming a booking made on your website Straight away, at the end of the booking Your website, before saving the booking
Check-in at a hotel, clinic or event On arrival, when the customer identifies themselves The front desk, in your system
Delivering an order When the courier is close, or at the door The courier, in the delivery app

Delivery with a code, step by step

1 The courier taps “arriving” in the delivery app. Your system sends the code with POST /v1/sms/otp and an expires_in long enough for the wait, say 30 minutes.
2 The customer gets the SMS with the code and the order number.
3 At the door, the customer tells the courier the code, who types it into the app. The app checks it with /verify.
4 With valid: true, the order is handed over and your system saves verified_at as proof of delivery.
5 If the code has expired (the customer was slow, traffic stopped), use POST /v1/sms/otp/{id}/resend: a new code goes out under the same id and the validity starts again.

Here the code is said out loud to the right person, which is the whole point. That is different from a payment or login code, which is never told to anyone. Make that clear in the text.

Example texts

Use Text
Booking [COMPANY]: code {code} to confirm your booking for 20/12.
Check-in [COMPANY]: your check-in code is {code}. Show it at the front desk.
Delivery [COMPANY]: order [NUMBER] is arriving. Give code {code} only to the courier, on delivery.
Do not send the delivery code on the day the order leaves. A code is valid for 1 to 60 minutes; sent in the morning for an afternoon delivery, it reaches the door already expired, and every resend is another SMS. To say the order is on its way, use a normal SMS like those in transactional SMS, and keep the code for the arrival.
Set a wait between resends in your account rules. An impatient courier pressing “resend” over and over uses credits and cancels the code the customer has just received. See limits against abuse.

Want to confirm bookings, check-ins and deliveries with an SMS code? See Verification SMS.

See Verification SMS

SEE ALSO

SMS verification API: we generate, send and check the code, and your system keeps only the id

Resending, cancelling and replacing a verification code: what happens to the old one

Code length, validity and attempts: choosing length, expires_in and max_attempts

Limits against abuse: codes per number per hour and the wait between resends

Writing the verification SMS: the code placeholder, your Sender ID and staying in one part

Transactional SMS: order notices, confirmations and alerts your customers expect

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.