This article provides technical details on how Hostaway’s auto-payment system interacts with reservations created via the Public API, especially when external offline charges are added.
Overview
When a reservation is created through the Hostaway Public API, the system can automatically apply an assigned auto-payment template. Our system is designed to handle cases where API partners add their own "offline charges" immediately after a booking is created.
Key Rules for API Integrations
- Independence from External Charges: The auto-payment engine only checks for charges previously generated by Hostaway templates. It does not consider external offline charges (added by API partners) as a reason to skip the payment schedule. This ensures that your guest’s payment plan is always created.
- Smart Calculation of the Remaining Balance: The system calculates the amounts to be charged by subtracting any externally collected funds from the total reservation price. This includes:
- Offline charges added by the API partner.
- Payments already collected by the OTA (e.g., Expedia or Booking.com). The auto-payment template will only process the remaining outstanding balance.
- Prevention of Double Charging: If the sum of all external charges already covers 100% of the reservation total, the system sets the remaining balance to 0. In this case, no additional automated charges will be triggered for the guest.
- Dynamic Recalculation: If the reservation is modified (e.g., dates changed or price updated), the system will recalculate the scheduled payments by again taking into account all existing offline charges to ensure the final balance remains accurate.
Important Note for Developers
If your integration is designed to add its own charges right after a reservation is created, Hostaway will still schedule its own automated collections for any remaining unpaid amount. Please ensure your workflow accounts for this to provide a seamless payment experience for the guest.