2

Currently, the workflow we have is as follows:

1.Client app clicks on checkout.

2.Turn quote into an order, and clear/deactivate quote. Set order as pending.

3.The app/user is then forwarded to third party payment gateway, where they'll enter their credentials.

4.The third party does a callback to our server, returning if the user has successfully paid the amount, as well as the increment order Id.

5.Upon success, create an invoice for the order and set as paid.

My question is, is this a correct workflow? Or should I create an invoice upon order creation? And what do I set the invoice capture option as? Offline or Online?

2

Your flow sounds good, you should create the invoice when you get the payment notification. About the capture online or offline: Capture Offline will simple generate the invoice and mark the order as processing, this is the case when the amount has been received manually, works for money orders kind of payment methods.

Capture online will connect with the payment gateway to capture the amount.

If your payment method auto generates the invoices, but you receive the money after order placement, you should disable the auto invoicing, and once you receive the money you can generate the invoice manually, and select Capture offline.

  • Alright then. Just to be sure I understood your answer. I generate the invoice programatically (in the callback function) and set it to paid all in one step/function (Payment reception), rather than split it into two steps. (Order creation and payment reception). – Pat Jul 24 '15 at 12:45
  • No, I think the second option is better, so create the order and later create the invoice on the payment reception. I just wanted to explain online vs offline capture. – lloiacono Jul 24 '15 at 12:47
  • 1
    Sorry that's what I meant. I create the invoice on the payment reception and not on order creation. – Pat Jul 24 '15 at 12:52

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.