Skip to Content
SPAPS is proprietary hosted SaaS. Paid access required; pre-1.0 contracts may change. Terms and access
GuidesDayrate Booking

Dayrate Booking

The hosted dayrate API coordinates availability, booking policy, free or allotment-backed booking, paid checkout, and payment reconciliation. Your application consumes one API contract while Sweet Potato operates the underlying service.

Mental Model

Hosted Integration

  1. Read availability from the staging application.
  2. Submit a booking through the authorized customer client.
  3. For a paid path, redirect to the returned checkout URL.
  4. Confirm completion from the hosted booking status after webhook reconciliation.
curl --fail-with-body \ -H "X-API-Key: $SPAPS_API_KEY" \ https://api.sweetpotato.dev/api/dayrate/availability

Booking Paths

PathMeaning
Free bookingPolicy or entitlement permits the authenticated user to book without checkout
Allotment bookingThe authenticated user’s eligible allowance is consumed instead of charging
Paid bookingSPAPS creates a Stripe checkout and reconciles completion through webhook handling

Free redemption binds to the verified user session. A guest request or a secret key without a user token stays on the paid path; supplying a user ID in the body does not grant free eligibility.

Common Mistakes

Do not mark a paid booking complete from the browser redirect alone. Use Stripe webhook reconciliation so payment state comes from the trusted server-side event path.

  • Treating booking policy as frontend-only logic.
  • Forgetting to test paid, free, and allotment paths separately.
  • Mixing staging and production product, policy, or booking identifiers.

See Also