More than 500 subpostmasters are to get an interim payment from the government worth around £40,000 each.