According to the Rambam, just as it is forbidden to lend to another Jew at interest, it is a positive mitzvah to charge interest when lending to non-Jews. This is a surprising requirement; what reason could there possibly be for it?
First of all, as we have discussed, the fact that Jews do not charge interest to one another is a form of reciprocity, like states recognizing one another’s drivers licenses. Non-Jews are not obligated in this matter. Therefore, one may borrow from them at interest and charge them interest. To forgo the interest due from a non-Jewish borrower would make the transaction lopsided and, to put it bluntly, make the Jewish lender something of a sucker. Additionally, if the Jew lends to everybody without interest, the fact that he doesn’t lend to other Jews at interest ceases to be special.
Of course, this isn’t to say that there aren’t circumstances in which the Jew could overlook interest from a non-Jewish borrower. One of these is if charging interest to Patrick when he didn’t charge interest to Moishy is going to create resentment.
Ramban (Nachmanides) does not count this among the 613 mitzvos. He sees the statement merely in contradistinction to the prohibition against charging interest to other Jews, i.e., to these (non-Jews) you shall lend with interest as opposed to those (Jews).
This mitzvah applies in all times and places. It is discussed in the Talmud in tractate Baba Metzia on pages 71a-72a. It is codified in the Mishneh Torah in the fifth chapter of Hilchos Malveh v’Loveh. This mitzvah is #198 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos; it is not listed in the Sefer HaMitzvos HaKatzar of the Chofetz Chaim.