Skip to content

Scheduled Payments PRO ​

Yatra → Settings → Payment — Scheduled Payments section

After a customer pays a deposit or partial payment at booking, automatically charge the remaining balance on a future date — once, or as installments — using the card saved at the gateway. Customer never has to log back in. Works best with Stripe (which keeps the payment method on file by default).

You can anchor the balance to the tour date instead of the booking date — e.g. "balance due 14 days before departure" — and Yatra will:

  • Auto-charge the balance that many days before the tour when a card is on file (Stripe), or
  • Email a secure "pay your balance" link before the tour when no card is saved (bank transfer, Pay Later, or any gateway that didn't vault a card), and
  • Require full payment up front when a booking is made inside that window (e.g. someone books 5 days before a tour whose balance is due 14 days before) — there's no time left to collect a balance, so the deposit option disappears at checkout and 100% is charged.

What you'll need ​

ThingWhere to get it
Yatra Pro licenseYatra → License
Scheduled Payments module enabledYatra → Modules → Scheduled Payments
Flexible Payments enabled tooRequired — Scheduled Payments charges the balance, which only exists when there's been a partial/deposit payment first.
A gateway that supports off-session chargesStripe is the supported gateway for automatic charging. With the tour-date anchor, other gateways (bank transfer, Pay Later, PayPal, Mollie, etc.) instead receive a secure balance-payment link by email before the tour — so every gateway is covered, one way or the other.

Step 1 — Enable the module ​

  1. Open Yatra → Modules.
  2. Find Scheduled Payments → toggle on.
  3. The Scheduled Payments section under Settings → Payment becomes editable.

Step 2 — Configure the schedule ​

Open Yatra → Settings → Payment → Scheduled Payments.

FieldSetting IDDefaultNotes
Enable scheduled balance paymentsenable_scheduled_paymentsoffMaster toggle.
Balance schedulebalance_anchorbookingbooking = a fixed number of days after the deposit (original behaviour); tour = a number of days before the tour date.
Days before tourbalance_due_days14Shown only when Balance schedule = before the tour date. The balance is collected this many days before the tour starts; booking inside this window forces full payment.
Schedule typescheduled_payment_typesinglesingle = one balance charge; installments = multiple payments. Installments apply to the booking anchor only — the tour anchor is always a single balance.
Days until first chargescheduled_payment_days15Days after the deposit before the first attempt. Used by the booking anchor only.
Number of installmentsscheduled_payment_installments32–24. Shown only when Schedule type = installments.
Days between installmentsscheduled_payment_interval30Shown only when Schedule type = installments.
Payment reminder (days before)scheduled_payment_reminder_days3Yatra emails the customer this many days before each charge / balance link.

Save.

Backward compatible

Balance schedule defaults to booking — so existing sites behave exactly as before until you switch it to before the tour date. Switching the anchor only affects new schedules; already-scheduled charges keep their dates.

The two schedule shapes ​

Balance scheduleWhat happens
Days after the deposit (booking anchor)One balance charge, or 2–24 installments, starting Days until first charge after the deposit and spaced Days between installments apart. Needs a saved Stripe card to auto-charge.
Days before the tour (tour anchor)One balance, due Days before tour before departure: auto-charged with a saved Stripe card, otherwise a payment link is emailed. Booking inside that window means paying in full.

What each payment method can do ​

Payment methodBalance collectionHow
StripeAutomatic off-session chargeThe card used for the deposit is vaulted at Stripe; Yatra charges the balance on the due date (as a Stripe invoice) with no customer action. A reminder email goes out Reminder days before.
PayPalPayment linkPayPal does not hand back a reusable customer + payment method pair in this flow, so Yatra cannot charge again by itself. The customer receives the secure Pay your balance now link instead.
Razorpay, Mollie, Paystack, Square, Authorize.Net, T-BankPayment linkNot auto-charged. Only Stripe is supported for automatic charging; plan on the customer paying through the balance link.
Bank Transfer / SEPA, Pay Later (offline)Payment link / reminderYatra cannot collect money itself. With Balance schedule → before the tour date, the daily cron creates a link-based reminder for every booking that still owes money — including deposits you recorded by hand — and emails the Scheduled Payment Reminder with Reminder days before the balance is due. The customer pays through the link with the online gateways you offer, or transfers again and you record it under Payments.

Two practical notes:

  • The automatic link-based reminder for offline bookings needs the tour-date anchor (balance due N days before the tour). With the booking-date anchor, only bookings whose gateway vaulted a card get a schedule row; for everything else use Payments → Scheduled → Outstanding → Send balance payment link to email the link on demand.
  • You can send that link at any time from the Outstanding tab, without waiting for the daily window.

Schedule relative to the tour date ​

Set Balance schedule → before the tour date and Days before tour → 14 to get the classic tour-operator model:

20% deposit at booking · remaining balance due 14 days before the tour · pay in full if you book within 14 days of departure.

Here's exactly what Yatra does, by gateway:

Situation at bookingWhat happens
Tour is more than 14 days away, card on file (Stripe)Deposit taken now. Balance auto-charged 14 days before the tour, off-session. A reminder email goes out a few days earlier.
Tour is more than 14 days away, no saved card (bank transfer, Pay Later, PayPal, Mollie…)Deposit taken (or recorded) now. A secure "Pay your balance now" link is emailed before the tour; the customer clicks it and pays the balance online — no login needed.
Tour is 14 days away or lessDeposit / partial options are hidden at checkout — the customer pays 100% up front. There's no time to collect a balance, so a deposit would leave money uncollected.

The "days before tour" date is derived from the booking's departure date (start_date, falling back to travel_date).

For bookings that can't be auto-charged, Yatra emails the customer a tokenised, guest-accessible link before the tour (in the Scheduled Payment Reminder email). Clicking it opens the normal balance checkout for that booking — no account or login required. The link:

  • is signed and scoped to a single booking (it can't be guessed or reused for another booking),
  • expires,
  • only ever charges the server-stored outstanding balance, and
  • self-retires once the balance is paid (or the booking is cancelled).

Add the pay button to a customised reminder template

The link is available as the merge tag, and the default Scheduled Payment Reminder template already renders a Pay your balance now button. If you've customised that template, add (or reset the template) so the button appears.

Step 3 — Verify with a test booking ​

  1. Make sure Flexible Payments is also on (so the booking has a balance to charge).
  2. In a private browser window, book a trip with Stripe (or another off-session-capable gateway). Pay the deposit / partial amount.
  3. The booking saves with status partial and a Due Now balance.
  4. Yatra schedules the balance charge based on the settings above. You'll see a row in Yatra → Payments with status Scheduled.
  5. Wait for the charge date (the scheduled charge runs from WP-Cron), or test with a short Days until first charge.
  6. Verify in your Stripe dashboard that the second charge went through, and the booking flips to paid.

How the flow looks to the customer ​

Booking anchor (charge N days after the deposit):

Day 0  — Customer pays $99 deposit on a $499 trip
Day N-3 — Reminder email: "Your balance of $400 will be charged on Day N"
Day N   — Yatra auto-charges $400 from the saved card
         — Customer receives a Scheduled Payment Received email
         — Booking status: paid

Tour anchor — balance due 14 days before departure (card on file):

Booking day       — Customer pays $99 deposit on a $499 trip departing 15 Aug
1 Aug (tour − 14) — Yatra auto-charges the $400 balance from the saved card
~29 Jul (−3 days) — Reminder email went out a few days before
15 Aug            — Tour departs, fully paid

Tour anchor — bank transfer / no saved card:

Booking day       — Deposit recorded; booking is `partial`
~29 Jul           — "Pay your balance now" email with a secure link
                    Customer clicks → pays the $400 online → booking `paid`

Tour anchor — booked inside the window:

5 Aug — Customer books the 15 Aug tour (only 10 days out)
      — Checkout shows no deposit option; full $499 is charged up front

If the charge fails (expired card, insufficient funds), Yatra:

  1. Tries again later while attempts are left. The payment goes back to Pending with a new date 24 hours later (filter: yatra_scheduled_payment_retry_delay_hours), up to the payment's attempt limit — 3 for balance charges. The customer gets the Scheduled Payment Failed email saying it will be tried again.
  2. After the last attempt — or straight away when there is no saved card, or Yatra can't create the Stripe charge — marks it Failed and sends the Scheduled Payment Failed email to the customer and the Admin: Scheduled Payment Failed email to you.
  3. A Failed payment isn't tried again. Collect the balance another way — send a payment link or use Send balance payment link on the Outstanding tab — or record the payment when the customer pays.

Installment example ​

With Schedule type = installments, Number = 3, Days between = 30, Days until first = 7:

Day 0  — Deposit paid: $99
Day 7  — Installment 1: $134 charged
Day 37 — Installment 2: $133 charged
Day 67 — Installment 3 (balance): $133 charged
Day 67 — Booking flips to paid

Yatra divides the remaining balance evenly across installments; the final installment absorbs any rounding so the total matches exactly.

The Scheduled Payments admin ​

Scheduled charges show in Yatra → Payments with:

  • Status = pending (scheduled, or waiting for a retry) / completed (charged) / failed (out of attempts) / cancelled
  • Charge date = when the attempt will run
  • Amount = the scheduled amount
  • Linked booking = clickable link to the booking detail

The only action on a scheduled row is Cancel payment — stop the scheduled charge (e.g. if the customer wires the money manually). There is no Charge now or Reschedule: to change the date, cancel the row and collect the balance with a payment link. The Outstanding tab also has Send balance payment link for bookings that still owe money.

Required email templates (already free) ​

Scheduled Payments uses four templates from the free transactional catalog:

  • scheduled_payment_reminder — sent N days before
  • scheduled_payment_succeeded — sent on successful charge
  • scheduled_payment_failed — sent to customer on failure
  • admin_scheduled_payment_failed — sent to admin on failure

The templates are listed in the Templates tab but read-only until this module is on.

Troubleshooting ​

Charges fail with "no payment method" — the gateway didn't save the card. Stripe saves cards by default; other gateways may require explicit Save payment method opt-in. Switch to Stripe or enable card-on-file in the gateway settings.

Customer wants to use a different card for the balance — they can update their payment method via the link in the Scheduled Payment Reminder email. Their account page also has a Saved payment methods section (Stripe only).

Scheduled charges or balance-link emails don't fire — Yatra uses two WP-Cron jobs: yatra_sync_scheduled_payments (twice daily) runs the auto-charges, and yatra_send_payment_reminders (daily) sends reminders and creates/sends the tour-anchored balance links. If WordPress cron is broken, neither fires. Confirm real system cron is configured, or trigger them manually to test:

bash
wp cron event run yatra_send_payment_reminders
wp cron event run yatra_sync_scheduled_payments

Tax / discount applies twice on the balance — Yatra computes the balance as total - amount_paid. Tax is already included in total; you shouldn't see double-tax. If you do, look at the booking's Payment Summary breakdown — likely an additional_services line is firing post-deposit.

Where to read more ​