1 Introduction

The world is facing one of its most significant economic crises in the aftermath of the COVID-19 outbreak. In this rapidly changing environment, real-time impact assessment of the pandemic is of high importance to identify sectors most hit by the crisis and recommend policies regarding the possible next phase of the outbreak. This paper uses monthly data from the universe of electronic payments via point-of-sale (POS) and online terminals in Iran to study the impact of lockdown due to the COVID-19 outbreak and the subsequent reopening the economy on consumption patterns and online-offline substitution.

Using the same monthly data of the previous year, we use a difference-in-difference methodology to identify the causal impact of the pandemic shock. We find that during the strictest lockdown months (March–April), the year-over-year growth rate in the value of transactions dropped by 41% compared to the months before the pandemic started. Following the reopening of the economy in Iran in May–June, the year-over-year growth rate rose by 12% above the benchmark months, suggesting an accumulated demand discharge after the reopening. We also find that the COVID-19 pandemic led to a spike in online transactions of activities with online terminals, and the impact continued to exist after the reopening of the economy. This can imply a persistent effect of COVID-19 on consumer preference for online shopping.

The very recent economic literature on the impact of COVID-19 is growing in different directions. This paper follows a strand of this literature that uses transaction data for the impact assessment of COVID-19. This type of studies is done for several countries, including France (Bounie et al., 2020), Portugal (Carvalho et al., 2020a), Mexico (Campos-Vazquez and Esquivel, 2021), Denmark (Andersen et al., 2020), Spain (Carvalho et al., 2020b), China (Chen et al., 2020), Japan (Watanabe and Omori, 2020), U.K. (Hacioglu et al. 2020), and the U.S. (Baker et al., 2020). Apart from the country of study, these papers are different in some other aspects, such as using nationwide data or data from a specific bank or institution, decomposing online vs. offline shopping, etc.

Three of the above papers use the universe of all transactions of their country of study. For France, Bounie et al. (2020) investigate consumer behavior in response to COVID-19 lockdown using the universe of French card transactions. They find that the substitution of POS shopping with online shopping alleviated the negative impact of the pandemic shock on consumption expenditure. For Portugal, Carvalho et al. (2020a) use aggregate nationwide data of POS and online shopping to study the impact of lockdown on electronic purchases. They find a 45% decrease in the year-over-year monthly growth rate after the pandemic. Across different sectors, while the purchase of groceries somewhat increased, sectors more affected by the lockdowns like tourism and restaurants experienced a severe drop in consumer spending. For Mexico, Campos-Vazquez and Esquivel (2021) use the universe of POS transactions before and after the COVID-19 lockdown and a 23% consumption reduction in the second quarter of 2020. Similar to studies of other countries, they find that sectors related to tourism are the most affected by the pandemic lockdown.

Among the papers that use data of a bank or institution, Chen et al. (2020) study the impact of COVID-19 on consumption patterns in China, using daily transaction data of a service provider covering around 30% of POS terminals. They find that in three months following the spread of COVID-19, transactions via POS terminals decreased by 70% in severely affected cities and estimate a 1.2% reduction in GDP of China in 2019. For Spain, Carvalho et al. (2020b) use transaction data of a large bank and find that COVID-19 reduced aggregate expenditure by about 49% in comparison to the same period in 2019, with a heavily disproportionate impact on POS transactions compared to online transactions. For Denmark, which had fewer restrictions than Spain and China, Andersen et al. (2020) use transaction data of the largest Danish bank and find that aggregate transactions dropped by around 25% after the pandemic lockdown. They also find that spending on goods and services more affected by restrictions and by people more vulnerable to COVID-19 fell more than others. In two similar studies, Hacioglu et al. (2020) find a decline of 46% in transactions from April 2019 to April 2020 in the U.K., and Baker et al. (2020), using data of a Fintech company, find that after an initial spike in total spending when cases begin to increase, there was a sharp decrease in overall spending.

In contrast to the above studies, which focus on high-income countries, our paper contributes to this literature by providing evidence for Iran, and to the best of our knowledge, no study is done yet for impact assessment of COVID-19 on consumption in the MENA region. Our data is universal, and it aggregates all individual transactions into monthly observations for 280 activities and 31 provinces of Iran. The data is decomposed based on POS and online terminals enabling us to look into online vs. offline shopping.

2 COVID-19 pandemic in Iran

Iran has been among the early countries with COVID-19 breakout and the first one in the Middle-east. At the time of writing this paper, the number of confirmed COVID-19 cases and deaths in Iran are the highest in the MENA region. The first confirmed case is reported on February 19, 2020, and the virus spread soon after, reaching 593 confirmed cases and 43 deaths as of February 29. In response to the pandemic, on February 22, the government announced the cancellation of all cultural and religious events, schools, and universities in the affected provinces, and it is extended to all provinces on March 4. However, the government did not impose complete lockdowns, and there was no quarantine for areas affected by the outbreak. As the traffic between cities continued, before starting the Persian holiday of Nowruz on March 21, the government announced a ban on travel between cities following an increase in the number of new cases. It also ordered the closure of shopping centers and bazaars across the country with exceptions for pharmacies and grocery stores.

As the number of new cases started to fall, restrictions were gradually relaxed starting in April. On April 5, the government allowed low-risk activities to open all over the country except Tehran province starting on April 11. On April 18, Iran allowed more businesses to reopen but schools, restaurants, malls, and grand bazaar remained closed. The partial lockdown continued to be relaxed in May when restrictions on restaurants and shopping malls eased. Consequently, the number of new cases increased again in May with new peaks in the number of deaths reported in July. As our data extends to late June, we can study the impact of lockdown as well as the reopening of the economy on consumption patterns.

3 Data and summary statistics

In Iran, like elsewhere in the world, electronic transactions have been rapidly replacing cash transactions. According to CBI (2017), 97% of Iranian households use electronic cards for their purchases. Shaparak is a company belonging to Iran’s Central Bank and acts as the clearinghouse for all transactions done via point of sale (POS) and online terminals using Iranian Rial. Shaparak publishes a monthly report on the total value and number of all transactions based on the type of terminal (POS or online). The monthly data we have access to is disaggregated at the levels of activity and province and covers the period from November–December 2018 to May–June 2020.Footnote 1 There are 31 provinces in Iran and about 280 listed activities in Shaparak, based on MCCFootnote 2 coding system. We use item-wise and province-wise price index obtained from the Central Bank of Iran to adjust the nominal values of transactions by inflation. The price index is for the base year 2016 and covers about 350 items. We match each Shapark activity to its corresponding item in the price index dataset.

We classify Shaparak activities in two ways. The first classification is based on the durability of the good that the MCC code provides and the second one is the standard Classification of Individual Consumption by Purpose (COICOP). Based on the type of good of the listed activities in Shaparak, we classify them into non-durable, semi-durable, durable retail sectors. Examples of activities selling non-durable goods are grocery stores, drug stores, and fuel stations; semi-durable goods include clothing and footwear, toys, sporting equipment, music & video recording, etc.; durable goods are activities selling computers, hardware, carpets, appliances, furniture, motor vehicles, etc. Appendix Table 4 shows the correspondence between the MCC codes and the classification of durability. Based on the listed activities in Shaparak, we also use the following 12 COICOP groups: food & beverages, tobacco, clothing & footwear, housing repair & expenses, appliance & furniture, health, transport, communication, recreation, education, restaurants & hotels, and miscellaneous goods and services. Appendix Table 5 shows the list of Shaparak activity codes belonging to each COICOP groups.

Figure 1 shows the monthly trends of the logarithm of number and real value of transactions from November–December 2019 to June–July 2020 and compares it with the same monthly trends for 2018–2019. In the three Persian months between November and February, while the number of transactions is about 20% higher in 2019–2020 than 2018–2019, the value of transactions is very close in the two years and moves in parallel. This suggests that the increase in the number of transactions between the two years is because of either a rise in small purchases with little values or a decline in the real value of large transactions between the two years. The Persian New Year holiday of Nowruz starts on March 21, and because of that every year in Iran there is a rise in shopping in Esfand (Feburary19–March 20) followed by a drop in Farvardin (March 21–April 20). We observe this pattern in both number and value of transactions in 2018–2019, but with the start of the pandemic in early March 2020, the monthly trend of 2019–2020 shows no rise in the number and value of transactions in Esfand compared to previous months and they decrease further in Farvardin. In comparison to 2018–19, the real value of transactions in 2019–20, reduces by about 20% in Esfand and 30% in Farvardin. After the gradual reopening of the economy in Ordibehesht (April 21–May 21) of 2020, the monthly trend of the number of transactions in 2019–2020 again stands about 20% above 2018–2019. Also, the value of transactions catches up with the last year in Ordibehesht and raises about 15% above the last year in Khordad (May 22–June 21).

Fig. 1
figure 1

Monthly trends of the number and the value of transactions (both in log scale) via shopping terminals in Iran. The highlighted area shows the time of COVID-19. The Persian New Year (Nowruz) starts at Farvardin and every year in Iran there is a rise in shopping before Nowruz in Esfand followed by a drop in Farvardin holidays

Table 1 shows the summary statistics of the variables. Overall, we have 261 activities, 31 provinces, 7 months, and 2 years, in our sample. Some activities, however, are not present in all provinces and the total number of observations is 111,944. On average, the natural logarithms of the number and real value of transactions that are made in each province and activity per month are 9.566 and 18.68, respectively.

Table 1 Summary statistics

Using Shapark data, we also compute the number and value shares of transactions via online and POS terminals. In many activity-province units, no online terminal is present and the share of online transactions is zero in both years. As we will explain below, in our regression specification, the dependent variable is assumed to be logarithmic and having zero online shares generates missing observations. For this reason, we define two separate sets of variables regarding shares of transactions via online and POS terminals: For measuring the online shares, we only keep activity-province units with non-zero online transactions in both years, but for measuring the POS share, we keep all observations. This distinction enables us to distinguish between the overall effect of COVID-19 on online shopping and its effect on activities in which online shopping is practical. Hence, regarding the type of terminals, we have four dependent variables in the regressions: (1) number share of online terminals and (2) value share of online terminals which are the natural logarithm of the shares of number and value of transactions made via online terminals to total, only for activity-province units with online terminals in both years; whereas (3) number share of POS terminals and (4) value share of POS terminals are the natural logarithm of the shares of number and value of transactions made via POS terminals for all province and activities. As Table 1 shows, in about 39% of observations that the online terminals are present, the log of number share and value share of online transactions are −7.38 and −8.78 respectively, suggesting that even in activities that online terminals are practical, POS terminals are more significant. Consistent with this, the log of shares of POS transactions are close to zero which implies their absolute values are near one.

4 Identification strategy

In order to estimate the effect of the COVID-19 pandemic, we exploit a difference-in-difference methodology similar to Carvalho et al., (2020a).Footnote 3 Table 2 shows how we choose our control and treatment months. We consider Esfand to Khordad (February 19 to June 21) as treatment months and Azar to Bahman (November 22 to February 18) as control months. The first year of data (t = 0) is 2018 for November to December and 2019 for January to June, and the second year (t = 1) is 2019 for November to December and 2020 for January to June. In Fig. 1, the months in the highlighted area are the treatment months and the dashed lines show the pre-treatment trends in these months.

Table 2 The setup of difference-in-difference strategy

Thus, our identification relies on the assumption that in the absence of COVID-19, the counterfactual trend of consumption in the treatment months, would have been parallel to the trend of consumption in control months. We then use the following regression specification for estimation

$$y_{t,m,a,p} = \gamma \,T_t + \mu _mM_m + \beta _m\,T_t \times M_m + \alpha _aA_a + \rho _pP_p + \varepsilon _{t,m,a,p}$$
(1)

where yt,m,a,p is one of our six outcome variables in year t, month m, activity a, and province p, that are either (1) log of number of transactions, (2) log of value of transactions, (3) log of number share of online terminals, (4) log of value share of online terminals, (5) log of number share of POS terminals, (6) log of value share of POS terminals. Tt is one for the observation between November 2019 to June 2020 (t = 1) and zero for observations between November 2018 to June 2019 (t = 0), Mm is a vector of month fixed effects, Aa and Pp are respectively activity and province fixed effects. Instead of choosing only one dummy for being in treatment or control months, we use the fixed effect of each month to investigate how the treatment effect evolves in the early lockdown and the later reopening. To avoid the underestimated standard errors problem, we cluster standard errors at province and activity levels (Angrist and Pishcke, 2009).

In this structure, the vector βm includes the desired coefficients to investigate the causal effect of the pandemic in month m. In particular, assuming the base month is m = 0 and averaging on activities (a) and provinces (p), we can write βm in its difference-in-difference format as

$$\begin{array}{l}\beta _m = [\ln({y_{1,m}})- \ln({y_{0,m})}]-[\ln({y_{1,0}})-\ln({y_{0,0}})] = \ln \frac{{1 + g_m}}{{1 + g_0}} \approx g_m - g_0\end{array}$$
(2)

where \(g_m = \frac{{y_{1,m} - y_{0,m}}}{{y_{0,m}}}\) denotes the year-over-year growth rate for month m in t = 1 (2019–2020) compared to t = 0 (2018–2019). Hence, βm reflects the change in year-over-year growth rate in month m compared to the benchmark month. Since we choose Azar (November–December) as the benchmark month, we can test the validity of parallel trends assumption by checking whether βm is significantly different from zero in Dey and Bahman, two control months between Azar and the start of the pandemic. If these two months are not significantly different from Azar, we are more confident about the validity of our identification assumption that in the absence of pandemic the treated months would have been growing parallel to control months.

In the last part of (2), we use the linear approximation ln(1 + x) ≈ x for |x| << 1. Normally, the year-over-year growth rates are small enough to make βm a good approximation of gm − g0. For large levels of gm or g0, however, the approximation gm − g0 ≈ βm may yield large errors. Therefore, in addition to estimating βm, we also compute gm − g0 = (eβm − 1) × (1 × g0) which is the exact level of the change in year-over-year growth rate in month m compared to the benchmark month.Footnote 4

5 The effect of COVID-19 on consumption patterns

In this section, we estimate the causal effect of the COVID-19 pandemic on the log of number and value of transactions. In addition to estimating regression (1) for the whole sample, we also estimate it for the subsamples of our classifications on durability and the 12 COICOP groups. For better illustration, we plot βm coefficients and their confidence intervals together with the computed gm − g0 in Figs. 24 and provide regression tables in Appendix Table 6. Figure 2 shows the overall effect of the pandemic on the number and value of transactions in Iran. After the start of the pandemic, we observe a sharp drop in transactions in Esfand and Farvardin with a follow-up recovery in Ordibehesht and Khordad as the government eased the restrictions. In Esfand, the year-over-year growth in the number and value of transactions dropped by 39 and 27% respectively compared to the control months. The lockdown restrictions in Farvardin caused more negative year-over-year growth such that the number and value of transactions touched negative growth rates of −53 and −41% respectively compared to control months. The more negative growth rate of number than value is consistent with the fact that during lockdown people went shopping less frequently and preferred to accumulate their shopping needs in a single time and basket.

Fig. 2
figure 2

The effect of COVID-19 pandemic on value and number of transactions. The points show the estimated monthly coefficients βm in (1) which is the change in year-over-year growth rate in month m compared to the benchmark month (Azar). gm − g0 is computed using the estimated βm and γ as (eβm − 1) × (1 + γ). The estimated regressions are presented in Appendix Table 6

Fig. 3
figure 3

Total value of transaction in the benchmark month before the pandemic (top graph) and the average negative monthly growth rate after the pandemic from February 19 to June 21 (bottom graph)

Fig. 4
figure 4

The effect of COVID-19 pandemic on value and number of transactions by durability of the good or service. The points show the estimated monthly coefficients βm in (1) which is the change in year-over-year growth rate in month m compared to the benchmark month (Azar). gm − g0 is computed using the estimated βm and γ as (eβm − 1) × (1 + γ). The estimated regressions are presented in Appendix Table 6. n is the number of observations

Following the partial relaxation of restrictions in Ordibehesht, the spending somewhat recovered and reached the growth rates of −13% in number and −7% in value compared to control months. In Khordad, while the year-over-year growth of the number of transactions was still below the benchmark month, the growth of the value of transactions raised above the benchmark month by +12% even though still some activities in education and tourism sectors remained closed. The higher year-over-year growth in spending after the partial reopening of the economy can be due to the release of the accumulated demand during two months of lockdown. Also, it can reflect higher demand for using electronic payments for the health risk of cash payments. We also note that the estimated coefficients are mostly insignificant before COVID-19 breakout (Dey and Bahman) suggesting that the year-over-year growth rate was similar in the three months before the pandemic and we can reasonably identify the causal effect of the pandemic by assuming counterfactual trends in treated months as parallel to control month. Overall, in the four-month period following the pandemic in Iran, the average year-over-year growth rate was about −15.75%. Assuming zero year-over-year growth for other months of the year, one can simply estimate a 5.25% contraction in Iranian’s consumption spending in 2020.

Figure 3 displays the regional effects. The top map shows the total value of transactions as a measure of total spending in the benchmark month and the largest values are for Tehran, Khorasan Razavi, Fars, Esfahan, and Khuzestan. The bottom graph shows the negative of average year-over-year growth rate after the pandemic (Esfand to Khordad) across provinces. We observe no significant correlation between the value of transactions and the average growth rate after the pandemic. In fact, it seems that popular tourist destinations during the Nowruz holidays–Hormozgan, Bushehr, and Fars, located near the Persian Gulf–are more negatively affected by the pandemic. In contrast, the least affected provinces are located in the west and northwest of Iran.

5.1 The effect of COVID-19 based on the durability of purchase

Figure 4 shows the results of estimating (1) based on the durability of the purchased goods. We observe that the lowest reduction in the year-over-year growth during the lockdown was for non-durables that include more necessities. In the strictest lockdown month (Farvardin) the year-over-year growth of number reduced by 35% and value by 26%. The highest reduction in year-over-year growth during the lockdown month of Farvardin was for semi-durable goods (−55% in number, −48% in value). As clothing and footwear comprise a large share of semi-durable goods, this observation is explained by the fact that the pandemic started before the Persian new year of Nowruz, when Iranians buy their new clothing and footwear.

After the reopening of the economy, the year-over-year growth of the number of non-durables and semi-durables raises above the benchmark month, but this is not the case for durables. In terms of the value of transactions, the highest year-over-year growth rate after the lockdown happened for semi-durables which is probably because of the postponed purchase of new year clothing and footwear.

The trend of year-over-year growth rate compared to the benchmark month before the starting of the pandemic is not significantly different from zero for non-durable and semi-durable goods which justifies our parallel trend assumption. For durables goods, however, although we observe a large drop during the lockdown, there was a significant decreasing trend in year-over-year growth rate before the start of the pandemic.

5.2 The effect of COVID-19 across COICOP groups

In this part, we look into the year-over-year growth rate across different COICOP groups. Figure 5a, b respectively illustrate the results of the estimation of (1) for the number and value of transactions within the subsamples of each COICOP group. We observe that in all groups except food and beverages, the number and value of transactions dropped significantly in Esfand and Farvardin. The largest decline happened in restaurant and hotel in Farvardin, the time of the Nowruz holiday in Iran and the peak time of domestic tourism, with year-over-year growth of −61% in value and −84% in the number of transactions. The next COICOP groups with large drops in Farvardin are education (−72% in number, −55% in value), recreation (−77% in number, −53% in value), clothing and footwear (−68% in number, −59% in value), health (−54% in number, −47% in value), transport (−45% in number, −42% in value), miscellaneous goods and services (−47% in number, −34% in value), and appliances and furniture (−35% in number, −30% in value). In contrast, food and beverages is the only group without a negative growth in value in Esfand and Farvadin and a positive growth in the number of transactions. The rise in the value of transactions of this sector can be either due to higher demand or the fact that people avoid using cash after the pandemic in grocery stores because they fear contagion. For communication, while the year-over-year growth of number was negative in Esfand and Farvardin, the negative growth of value was insignificant, which can reflect the increase in demand for remote working via the internet. Regarding the parallel trend assumption, we observe significant differences in year-over-year growth before pandemic in food & beverages, tobacco, housing expenses, health, and transport. Therefore, we avoid interpreting the estimated numbers in these groups as causal effects.

Fig. 5
figure 5

a The effect of COVID-19 pandemic on number of transactions by COICOP groups. The points show the estimated monthly coefficients βm in (1) which is the change in year-over-year growth rate in month m compared to the benchmark month (Azar). gm − g0 is computed using the estimated βm and γ as (eβm − 1) × (1 + γ). The estimated regressions are presented in Appendix Table 6. n is the number of observations. b The effect of COVID-19 pandemic on value and number of transactions by COICOP groups. The points show the estimated monthly coefficients βm in (1) which is the change in year-over-year growth rate in month m compared to the benchmark month (Azar). gm − g0 is computed using the estimated βm and γ as (eβm − 1) × (1 + γ). The estimated regressions are presented in Appendix Table 6. n is the number of observations

After the gradual reopening of the economy in Ordibehesht and Khordad, we observe a recovery in the year-over-year growth rates. In clothing and footwear, appliance and furniture, communication, and miscellaneous goods in which postponing household demand is more, we observe that the year-over-year growth in value rises above the control months after reopening in Khordad. In health, recreation, transport, education, and restaurant and hotel, the recovery is not such that the year-over-year growth in value becomes larger than the control months.

6 The effect of COVID-19 on online vs. POS shopping

In this section, we investigate how the pandemic lockdown affected the share of online transactions in Iran. Online transactions are likely to increase during lockdowns because they are not affected substantially by restrictions on movements of buyers and also individuals prefer not to involve in outdoor shopping for public health reasons. The substitution of online for POS shopping, however, depends on the “online-ability” of the goods or services. In many activities, online terminals are not present and in our data, only about 39% of activity-province units have nonzero values for online terminals. For this reason, we estimate (1) once for the log of shares of online transactions and once for the log of shares of POS transactions. In this way, the estimations for the online shares reflect the evolution only within activities where online terminals are present, and the estimation for the POS share reflects the evolution in all activities.

Figure 6 plots the estimated coefficients of (1) for log of number and value shares of transactions made via online terminals (left) and POS terminals (right). The two graphs on the left suggest that, within activities that online shopping is possible, after the pandemic the year-over-year growth of both measures of online purchasing starts to rise significantly above the control months. Interestingly, even after the reopening of the economy in Ordibehesht and Khordad, the increasing trend of βm continues for value share, suggesting that the pandemic created a persistent positive impact on preference for online shopping in Iran.

Fig. 6
figure 6

The effect of COVID-19 pandemic on value share and number share of online transactions. The points show the estimated monthly coefficients βm in (1) which is the change in year-over-year growth rate in month m compared to the benchmark month (Azar). gm − g0 is computed using the estimated βm and γ as (eβm − 1) × (1 + γ). The estimated regressions are presented in Appendix Table 6. The number of observations is 44,032 and 111,890 for online share and POS share, respectively

The year-over-year growth rate of the value share of online transactions was not significantly different from control months in Esfand, but it spiked to +59% in Farvardin and then ranged up to +111 and +116% in Ordibehesht and Khordad, respectively.Footnote 5 The number share of online transactions started to grow 17% more than the benchmark month in Esfand and is positive and significant in Farvardin and Khordad. The higher growth in value share compared to number share suggests that people not only buy their shopping online, but also spend much more per online purchase. Since online shopping comes with a delivery cost, thinking of economies of scale, people normally accumulate their online shopping in one basket to reduce the transportation cost.

The graphs on the right in Fig. 6 show the evolution of year-over-year growth of number and value shares of POS terminals for all activities. As in the sample more than 99% of transactions, on average, are made via POS terminals, the estimated growth rates are small. Nevertheless, similar to the online share, we observe that the lockdown has had a persistent effect on reducing the share of POS transactions (increasing the share of online transactions). Given that in the whole sample, on average, POS transactions comprise about 99% of all transactions, −1% year-over-year growth rate of POS share means that the year-over-year growth rate of online share nearly doubled after the pandemic.

In Fig. 7, we decompose the effect on online share and POS share based on the durability classification. The top graphs of Fig. 6 show that in the subsample of activities with online terminals, semi-durable goods had the highest increase in the share of online transactions. In the non-durable goods, while the year-over-year growth of the value share of online transaction significantly increased, the number share did not. In the bottom graphs regarding the POS share of transactions, we find significant βm after the pandemic only for semi-durable and durable goods and not for non-durables.

Fig. 7
figure 7

The effect of COVID-19 pandemic on value share and number share of online transactions by retail sectors. The points show the estimated monthly coefficients βm in (1) which is the change in year-over-year growth rate in month m compared to the benchmark month (Azar). The estimated regressions are presented in Appendix Table 6. n is the number of observations

Figure 8a shows that among activities with online terminals, in all COICOP groups except tobacco, the value share of online transactions grows significantly more after the pandemic, with the largest year-over-year growth rates in clothing & footwear, housing expenses, and health. In contrast, the year-over-year growth rate of the number share of online transactions is significantly increased in treatment months only in clothing and footwear, recreation, and education.

Fig. 8
figure 8

a The effect of COVID-19 pandemic on value share and number share of online transactions by COICOP groups. The points show the estimated monthly coefficients βm in (1) which is the change in year-over-year growth rate in month m compared to the benchmark month (Azar). The estimated regressions are presented in Appendix Table 6. n is the number of observations. b The effect of COVID-19 pandemic on value share and number share of online transactions by COICOP groups. The points show the estimated monthly coefficients βm in (1) which is the change in year-over-year growth rate in month m compared to the benchmark month (Azar). The estimated regressions are presented in Appendix Table 6. n is the number of observations

Figure 8b presents the estimation results for the POS share of transactions where the sample includes all activities with or without online terminals. We observe that the year-over-year growth rate of POS share of transactions persistently declined only in clothing & footwear and education. In communication and miscellaneous goods, a temporary negative growth happened in the strictest lockdown month (Farvardin) which did not last in the later months.

7 Conclusion

COVID-19 has spread throughout the world since January 2020 and understanding the response of consumers to this shock needs investigation from various aspects. This paper uses the aggregate data of all electronic payments across different activities in Iran before and after the pandemic to gauge the impact of the shock on consumption patterns and online shopping. The period of our study allows us to examine the patterns during the lockdown and also the consumption recovery path after the relaxation of lockdown.

Our difference-in-difference estimation implies a 41% reduction in year-over-year growth rate of transactions during the strictest lockdown time compared to before the pandemic. This number is close to similar estimations for other countries like Portugal, Spain, and the U.K. (Carvalho et al., 2020a, 2020b; Hacioglu et al. 2020). We also find that after the relaxation of the restrictions, the year-over-year growth rate of transactions rises above the pre-pandemic time by about +12%. Overall, in four months following the pandemic, the monthly average of the year-over-year growth rate was −15.75% and assuming zero growth rate for the rest of the months of year, we can forecast 5.25% contraction in Iranian’s spending in 2020.

Similar to other studies in the recent literature, we find heterogeneous effects of the pandemic across provinces and sectors. Because the timing of the pandemic coincided with the Nowruz (new year holidays) in Iran, the popular tourist destinations were hit the most. Also, semi-durable goods like clothing and footwear which are highly demanded before the Nowruz in Iran had the most negative growth rates during the lockdown months. Non-durable goods were the least affected by the pandemic and the purchase of essential consumer goods such as food and beverages grow in the lockdown time.

We also find a large and persistent effect of the pandemic on preference for online purchasing which did not fade away after the relaxation of restrictions. In semi-durable and durable goods that online purchasing is more practical, we observe larger and more persistent effect on online shopping after the pandemic rather than non-durable goods.

Our paper contributes to the recent and growing literature that uses transaction data to study the impact of COVID-19 on the economy. Our data comprises all transactions made via POS and online payment terminals in Iran. This data provides many avenues for future research especially if one can access its microdata. For instance, combining this data with other measures such as health outcomes, mobility, and savings can shed more light on the behavior of households before and after the pandemic time.