Markus Michalski FAQ

Riverty Payments: Reconciliation and Expiry

Reconciling open Riverty payments in Sylius - reconcile command with options, 30-day authorization expiry, warning window and the daily digest mail

Deutsche Version

Back to overview

Riverty Payments: Reconciliation and Expiry

This documentation always describes the latest published version.

Reconciling open payments

Riverty sends no webhook. A customer who pays at Riverty and then closes the browser never comes back to the shop, so the Sylius payment would stay open although Riverty holds an accepted order. The command mmd:riverty:reconcile finds these payments and asks Riverty about them. Run it from a cron job:

*/10 * * * * cd /path/to/shop && bin/console mmd:riverty:reconcile

What the command does

For every Riverty transaction that is still pending and whose payment is still open (new or processing):

Answer from Riverty Result
Accepted The payment is authorized, exactly as if the customer had returned
Rejected The transaction is rejected and the payment fails
Still open Nothing happens, the customer may still be in the hosted checkout. Once the offer Riverty named has expired, the transaction expires and the payment fails. A missing or unreadable expiration date never expires anything
Riverty cannot be reached or answers unexpectedly Nothing changes, because Riverty may hold a valid authorization. The next run asks again

What it does not do: it never touches a transaction that is already authorized, captured, voided or refunded, it does not capture or refund anything, and it does not cancel orders.

Options

Option Default Description
--older-than=15 15 Minutes a transaction must have been untouched, so a customer who is still paying is not disturbed
--limit=100 100 At most this many transactions per run, oldest first
--dry-run off Asks Riverty and prints what would happen, changes and sends nothing
--no-digest off Does not send the daily digest mail
--api-log-days=7 30 Retention of the API log for this run, see Configuration

The output is a table with the Riverty reference, the order number, the outcome and the payment state, plus a summary line. The exit code is 1 only when every attempted transaction failed unexpectedly.

Expiring authorizations

Riverty cancels an authorization by itself 30 days after it was made and tells the merchant nothing. A shipped order that was never captured is then not paid by Riverty, and once the reservation is over, capturing is impossible. The plugin watches for this.

graph TD
    A["Authorization granted"] --> B["Plugin notes creation time plus 30 days"]
    B --> C{"Warning window reached?"}
    C -->|No| D["Nothing"]
    C -->|Yes| E["Note on the order page and entry in the digest mail"]
    E --> F{"Does Riverty report the end?"}
    F -->|No| G["Reservation stays"]
    F -->|Yes| H["Transaction Authorization expired, payment cancelled"]

The daily digest mail

The mail goes to the contact email of the channel (set it in the channel settings; the settings page warns when it is missing), in the default language of the channel, at most once a day and only when there is something to report. The sender is the Sylius mailer sender address.

Order of the entries:

  1. shipped orders that were not captured
  2. reservations Riverty cancelled (reported once)
  3. reservations that end within the warning window
  4. unknown answers of Riverty

An order appears once, under the most urgent heading. The mail links to the orders only when the channel has a hostname, and the links use https.

mmd:riverty:reconcile --no-digest skips the mail; --dry-run asks Riverty but changes and sends nothing.