How do we implement a logic in the new payment gateway api where a user will be given qr code (handled by an api call) and use that qr code to pay in person through the post office?
We have an external api that processes the payments for the store so all we need to access from the checkout are the email address of the store, total price amount. We've tried to follow the devdocs and the sample payment gateway module but to be honest I'm not really sure what's going on.
Can someone enlighten me on this concept.
You can do like create one payment method.
After order place, admin will click on button you will call API and add that barcode into that order.
hope it will work for you.
The following article could be useful to clarify the concepts of payment methods in Magento 2: