Just in time for the unveiling of the next Apple iPhones, Wal-Mart has announced a new smartphone trade-in program.

The retail giant said customers can trade in their devices at any of thousands of Wal-Mart or Sam's Club stores to receive credit that they can apply toward the purchase of a new device with a two-year contract with AT&T, Sprint or Verizon. The credit can also be applied toward a device from Straight Talk, a prepaid brand available at Wal-Mart.

Under the program, customers take their device to the electronics department at any Wal-Mart or Sam's Club store. There, employees will assess the value of the device by asking a series of questions.

LIVE: Apple iPhone event

Wal-Mart said that if the device is accepted, customers can receive as much as $300 for an iPhone 5. In total, the program accepts 100 different kinds of smartphones.

The new program will kick off on Sept. 21, one day after the new iPhone models are expected to go on sale.

Wal-Mart's trade-in program also comes just a few weeks after Apple kicked off a new trade-in program of its own.

Under that plan, when customers buy a new iPhone at an Apple retail store, they can ask to trade in their older iPhone. Depending on the calculated worth of the old device, Apple will give customers a gift card that can be applied toward the purchase of the new iPhone.

ALSO:

With the iPhone 5C, the 'C' may stand for 'China'

Why I cut the cable cord and you probably shouldn't

Apple rumor roundup: iPhone 5C, gold iPhone, Apple TV and China