This is fairly strait forward. The coupon code is stored in a session variable, you just need to store that variable in the orders table.
First, you need to add a coupon column to the orders table in your MySQL database
Open the confirm page, and double click the eCart Store Order Summary server behavior.
Select the new coupon column, then click the lightning bolt next to value. from the session collection, select the coupon code session variable and click OK.