American Express beat estimates for second-quarter profit on Friday as its affluent customer base continued to spend, undeterred by sticky inflation and rising interest rates.

While rising prices for everything from energy to groceries are burning a hole in the pockets of most Americans and weighing on the economy, AmEx has been largely spared from their impact as its young and wealthy customer base carries on with shopping, dining out and travel.

Total network volumes climbed 8% to $426.6 billion in the second quarter ended June 30.

"Card member spending hit another all-time high, growing 8 percent on an FX-adjusted basis, driven by double-digit growth in U.S. Consumer and International Card Member spending," CEO Stephen Squeri said in a statement.

The credit card company reported a profit of $2.89 per share in the quarter, beating analysts' average expectation of $2.81 per share, according to IBES data from Refinitiv.

The boost from upbeat consumer spending helped the company offset its creation of bigger rainy-day funds to guard against fallout from a weakening economy.

AmEx's total provisions for credit losses came in at $1.2 billion in the second quarter, compared with $410 million a year earlier.

Total revenue, net of interest expense, rose 12% to $15.05 billion, driven by higher average loan volumes and increased card member spending.

Shares of American Express are up nearly 20% so far this year. (Reporting by Manya Saini in Bengaluru; Editing by Anil D'Silva)