2

What would be the proper way to approach splitting order payment amount to a several payment transactions? For example to split order of $300 and make several payment gateway API calls billing customer for 100, 100 and 100.

Is it even possible to have one Order with multiple transactions of Authorize/Capture type and have them voided/refunded later on?

1

While this is technically possible, you will not find any Magento2 payment method that supports it out of box. (I'm not aware of any for M1, either, for that matter.)

Doing it would require a custom payment method that keeps track of transaction amounts and allows invoicing independent of the order's actual item amounts. The problem is that by default there is very tight coupling between invoices and items: You choose the items you want to invoice, and your invoice total reflects the price of those items. Unless your $300 order contains three $100 items, you will not be able to run three separate $100 charges short of some fairly extensive customizations.

  • I was thinking more in line of still having one invoice per order, that would be generated after all payment transactions have been captured. – Stasa Stanisic Sep 22 '16 at 9:39
  • That might do the job. Still, it would take a fairly customized payment method to pull it off, probably one supporting tokenization (stored cards). Most methods won't allow multiple auth/captures. – Ryan Hoerr Sep 22 '16 at 11:22
  • Yes, it is Stripe payment method with stored cards, so it is not a problem to send multiple captures, but I'm finding it hard to relate and connect those captures to multiple transactions on one order. – Stasa Stanisic Sep 22 '16 at 13:59
  • Maybe the problem is that I'm trying to make those multiple API calls inside one capture(\Magento\Payment\Model\InfoInterface $payment, $amount) ? – Stasa Stanisic Sep 22 '16 at 14:22
  • I have done this before, its very possible. I just cant recall. its been few months back then – Afham Sep 26 '18 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.