Bed Bath & Beyond is buying Toys R Us gift cards after the toy company suddenly shut down its websites (BBBY)

Bed Bath & Beyond is buying Toys R Us and Babies R Us gift cards, but only for a limited time.

The home goods company is offering to purchase the cards at a discount as Toys R Us winds down its US business by closing all its stores and shutting down its websites. In return, the company will pay shoppers in the form of a Bed Bath & Beyond gift card.

The offer, which is accessible on Bed Bath & Beyond's website, expires on Thursday at midnight.

RELATED: Retailers that filed for bankruptcy in 2017

Shoppers who take advantage of the offer won't receive the full value of their Toys R Us gift cards, since Bed Bath & Beyond is buying them at a discount.

The company will reimburse shoppers for about 65% of the value of the cards. Bed Bath & Beyond will pay out $64.20 for a $100 Toys R Us gift card, for example.

But it's still a good deal for shoppers who are running out of ways to spend their Toys R Us gift cards, after Toys R Us abruptly shut down its websites last week.

The value of the gift cards at Toys R Us will expire within two weeks.

More from Business Insider: