No, the booking will not go through if the hotel runs out of rooms between when your customer sees the price and when they complete their payment. This is one of the main reasons we ask you to understand how hotel APIs work before you start selling rooms to your customers.
When a hotel API shows you a room and a price, that is not a guarantee that the room is still available. The API is showing you what was available a moment ago, but hotels sell rooms constantly and inventory changes very quickly. Some portals hold rooms for a short time to give customers a chance to book, but most do not. The hotel API will only confirm that a room is actually yours when the payment goes through successfully.
If your customer tries to pay and the room is no longer available, the payment will fail and you will need to offer them a different room at the same hotel, a different hotel altogether, or give them their money back. This is frustrating for your customer and for you, but it is how the hotel industry works because hotels cannot lock rooms away for every person who looks at them online.
Before you launch your portal, ask your supplier what happens when a booking fails due to lack of availability and whether they can hold rooms for a short time. This will help you set the right expectations with your customers and know what to do when it happens.