Payment Refund, Cancellation, and Reversal

The plugin handles reversals, cancellations, and refunds differently depending on the capture mode configured for your payment method. Understanding these differences is crucial for proper order management and customer service operations.

The behavior varies significantly between automatic and manual capture modes, with each offering distinct advantages and workflows for handling payment reversals.

Automatic Capture Mode

In the admin's panel, cancelling or refunding an order triggers a payment reversal.

This ensures that funds are either released (if not yet captured) or refunded (if already captured), keeping Sylius and Adyen in sync. In all cases, the payment in Sylius is already completed, whereas the state of its Adyen counterpart remains undetermined.

How it works for a new order:

This path applies if the payment was authorized but not yet captured at Adyen.

  1. Cancel the order via the show page.

  2. Sylius sends a reversal request to Adyen.

  3. Payment enters the state processing_reversal. No changes have been made to the main order payment state yet.

  4. Adyen voids the authorization (no funds taken).

  5. Sylius updates the payment state to cancelled.

  6. The order gets cancelled.

How it works for a fulfilled order:

This path applies if the payment was authorized but not yet captured at Adyen.

  1. Refund the order via the show page.

  2. Sylius sends a reversal request to Adyen.

  3. Payment enters the state processing_reversal. No changes have been made to the main order payment state yet.

  4. Adyen voids the authorization (no funds taken).

  5. Sylius updates the payment state to cancelled.

  6. The order's payment state gets cancelled.

Manual Capture Mode

Provides precise control over payment operations, with distinct actions for different payment states. Unlike automatic capture, manual mode does not use reversal logic.

Cancellation

In manual mode cancellation is only available for payments in the authorized state. Triggering the order cancellation with a completed payment will cancel the order and shipment, but no change will be done to the payment states.

  1. Cancel the order via the order page

  2. Sylius sends a cancellation request to Adyen

  3. The payment state changes to processing

  4. Adyen cancels the payment

  5. Sylius updates the payment and order payment states to cancelled

Refunding

In the manual mode, partial refunds are possible as opposed to only full refunds in automatic mode. The SyliusRefundPlugin handles internal refunding logic.

In manual mode refunding is only available for payment in the paid state.

  1. Access the refunds page through the order show page, by clicking the "Refunds" button

  2. Click "Refund all" at the top of the page and then "Refund" at the bottom

  3. A new refund payment has been created for the whole amount of the order

  4. Once the REFUND webhook event arrives, the refund payment transitions to Completed and the whole order gets marked as Refunded

Last updated

Was this helpful?