There are to ways to change the display order of your store’s payment methods at checkout:
- Through Admin.
- Through JavaScript customizations.
Note: for security and performance reasons, we do not recommend that you alter the checkout JavaScript archives. VTEX does not take responsibility for any problems caused after the alteration of this code.
How Sorting Works
In general, the display of payment conditions at checkout is defined by the order in which they were registered in the Admin's Payments section. In other words, the payment option that has been active the longest in your store will be the first one displayed to your customer.
But changing this ordering is simple. First, deactivate the pre-established payment conditions. You can then arrange the payment methods the way you prefer, and then the conditions again.
However, this behavior is not a universal rule. This happens because, in order to appear on the interface, some payment options need the identification code (ID) and the names generated by the affiliation used to process them.
VTEX does an affiliation row call and receives the necessary data to display the payment options. Since these calls are the last ones to be answered, the payment options that undergo this process always end up at the bottom of the list.