I'm on Magento 2.4.4, using paypal_express payment method. I've noted that the order workflow for this payment method is this one :

  • Customer go through Magento 2 checkout, choose Paypal as payment method.
  • Customer is than redirected to paypal, to finish payment process.
  • Paypal notifies Magento & redirect customer to success

but, the magento order is only created once paypal notifies magento (this can create order loss) and in all others payment methods order is created before leaving magento for the PSP.

  • Do you have the same workflow using paypal express?
  • Can it be changed to create order before leaving magento ?

help appreciated, thanks.

1 Answer 1


The customer is not actually charged when once they finish the flow in PayPal popup. Pretty much, the flow is this way:

  1. User selects paying with PayPal. Magento is sending the user to PayPal, along with a note, telling PayPal: "Hey PayPal, I want to charge this customer this amount, for this order".
  2. PayPal is asking the user to select payment method, and confirm, and, if everything is ok, then PayPal sends the user back to Magento, with another note: "Hey Magento, this customer is good to go for this order. Here is a secret (token) which you will have later to send back to us".
  3. User confirms on the checkout to place the order (sometimes this happens automatically, with no user interaction). Magento is creating the order, and sends to PayPal that secret (token) which they received previously, telling them that the order was placed, and they should charge the customer for that order now. This avoids creating unnecessary orders in the database, if the user is redirected to PayPal, but they never finish placing the order.
  • Thanks for your answer and describing the flow. But in step 3. it happens that the payment is made on paypal side, but the order not created. If i read your correctly this shouldn't happen ? (but unfortunately it does...)
    – ffab
    Commented Feb 23, 2023 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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