Cancellation and refunds
A policy is a table
Section titled “A policy is a table”Each option has a cancellation policy: a list of tiers, each giving a refund for cancelling a number of whole days before the start.
{ "name": "Flexible", "preset": "flexible", "tiers": [ { "from_days": 1, "to_days": null, "refund_pct": 100 }, { "from_days": 0, "to_days": 0, "refund_pct": 0 } ]}This one reads: cancel a day or more before the start for a full refund; on the day, nothing back.
preset |
Rule |
|---|---|
flexible |
Full refund up to 24 hours before the start. The default. |
moderate |
Full refund up to 7 days before, half up to 24 hours before. |
strict |
Full refund up to 30 days before, half up to 14 days before, nothing after. |
non_refundable |
No refund. |
custom |
The seller’s own tiers. |
Show the policy in words on the trip page (each option’s policy) and
again before checkout (the quote’s policy). The booking keeps the policy
it was sold with, even if the seller changes it later.
The refund
Section titled “The refund”The refund is the tier’s share of what was due upfront (due_now).
Amounts paid on the day are never refunded through tourpingo. Show the
refund before the traveller cancels:
curl "https://api.stg.vacationpackagesoman.com/v1/public/bookings/TP-4HZQ-8MNE/refund?token=TOKEN_FROM_THE_LINK" \ -H "Tp-Publishable-Key: $TP_KEY"const res = await fetch("https://api.stg.vacationpackagesoman.com/v1/public/bookings/TP-4HZQ-8MNE/refund?token=TOKEN_FROM_THE_LINK", { headers: { "Tp-Publishable-Key": process.env.TP_KEY!, },})const answer = await res.json()Answer: 200 OK
{ "days_before": 12, "refund_pct": 100, "refund": { "amount": 18000, "currency": "USD" }, "paid": { "amount": 18000, "currency": "USD" }}days_before counts whole days from now to the start, in the trip’s own
time zone. The seller can lower the fee for a traveller, never raise it.
Who can cancel
Section titled “Who can cancel”- The traveller, through the booking’s signed link (its token) or signed in to their account. An email address alone never cancels.
- The seller, in the portal.
A cancelled booking’s places go back on sale, and the traveller is emailed. Managing a booking has the requests.
Paying the money back
Section titled “Paying the money back”The seller returns money paid by bank transfer or payment link; a booking paid on the day has nothing to return. Card payments, and refunds through them, come later.