Order & payment workflow¶
Placing an order¶
The Amazon Pay checkout uses the standard Magento 2 checkout however it replaces certain forms with widgets that populate the data the forms would have requested.
On the shipping step of checkout the address form is replaced with a shipping widget
On the payment step of checkout payment methods are replaced by a payment widget
In instances where the billing address is not exposed such as within the US region the shipping address will be used to populate the billing address
The actual order flow other than this remains the same, as it is for the standard Magento 2 checkout.
Orders placed with Charge on Order mode enabled will automatically be captured. For orders placed using Charge on Shipment you will need to raise an invoice. To do this, the following steps are required:
- Log in to the Magento 2 admin
- Open the order for which you want to capture payment and click the Invoice link located in the top row. Please make sure that the payment you want to capture has an open authorization transaction and is in the Processing state.
- Submit the invoice form ensuring the Capture Online option above the Submit Invoice button is selected.
It is vital that Capture Online is selected as otherwise Amazon Pay will not be instructed to capture the payment, resulting in you not receiving any funds.
In case there is a problem taking the payment, a notification will be added to Magento 2 to make you aware there has been a problem.
The order, which payment has been captured for, can be refunded either fully or partially. Refunds are made against invoices and thus having a paid invoice assigned to the order is a necessary condition that has to be met to refund any order item.
Refunds in Magento 2 are recorded as credit memos. To request a refund with Amazon Pay, you simply need to create a credit memo. To create a credit memo, login to the Magento 2 admin, open the order you want refund, click the Invoices tab on the left, select an invoice you want to refund and click on it.
A preview of the selected invoice will appear. Make sure that you are on the single invoice preview page and click the Credit Memo button.
A new credit memo form will appear with most of the crucial data (like product quantities to be refunded) already filled in.
If you want to refund the invoice partially (i.e. only a part of the invoiced items) adjust the product quantities to be refunded (set 0 for items that shall not be refunded) and click the Update Qty’s button to update refund totals. You can also set the refunded items back to stock by checking Return to Stock checkbox.
Next choose if you want to refund shipping costs or apply any refund adjustments and fill in the appropriate fields. Before submitting the credit memo form, double check that you have the Refund button available and click it. A credit memo will be created and a refund will be requested with Amazon Pay.
Refunds will always be initially accepted as the vast majority of the time there will be no issue. However, if there is a problem after the refund has been issued, a notification will be added to Magento 2 to make you aware there has been a problem refunding the customer.
Always use the Refund button available on the new credit memo form invoked from the single invoice preview page. If you click Credit Memo button directly on the order page you will be redirected to the new credit memo form with Refund offline button only, which will appear to be successful. However it will not notify Amazon Pay and the customer will not receive their refund.