(WTVO) — That $5 latte people buy on their way to work could help them save money on their next flight.

Starting Wednesday, Delta and Starbuck have teamed up. Customers will earn one Delta reward mile for every $1 they spend at Starbucks. They can also earn double rewards on orders on the day of their Delta flight.

It will not automatically apply, as customers have to line their Starbucks and Delta rewards first. If they link their accounts before the end of the year, they can get a bonus 500 miles.