Rental Pricing and Availability: Choose the Right Duration with the OtpGet API
A good rental screen answers three questions before the customer pays: where is a number available, how much does each duration cost, and is a number actually in stock right now? The OtpGet Rental API has one call for each.
1. getRentalCountries
https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalCountries
Returns the countries that currently offer rentable numbers. Use it to fill a country selector.
2. getRentalPricing
https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=getRentalPricing¤cy=USD
Returns the price for each rental duration. Add the optional currency parameter to receive amounts already converted to your currency. Your API discount, if you have one, is already applied.
3. getAvailableRentals
Shows what can be rented at this moment. Stock changes, so call it right before you let the user press the rent button, and handle an out-of-stock answer politely.
Choosing a duration
- Short rental - one verification that may need a second code or a re-login.
- Medium rental - an account you actively use for a few days.
- Long rental - accounts you keep for a long period; the per-day cost is usually lowest.
Show the total, not the surprise
Always display the final price in your customer's currency before the purchase. Combined with the currency parameter, you never have to maintain exchange rates yourself.
Checklist for your UI
- Load countries on page open.
- Load pricing when a country is picked.
- Re-check availability when the user clicks rent.
- Show a clear message if there is no stock instead of a blank error.
Start building with OtpGet
Create a free account at otpget.com, copy your API key from the dashboard and open the API documentation. Our support team is available 24/7 if you get stuck.