 
     propTypes:
         applied_coupons : rtypes.immutable.Map
+        coupon_error    : rtypes.string
 
     getInitialState: ->
         coupon_id : ''
 
+    # Remove typed coupon if it got successfully added to the list
     componentWillReceiveProps: (next_props) ->
         if next_props.applied_coupons.has(@state.coupon_id)
             @setState(coupon_id : '')

        <Subscriptions
            subscriptions   = {@props.customer.subscriptions}
            applied_coupons = {@props.applied_coupons}
            sources         = {@props.customer.sources}
            selected_plan   = {@props.selected_plan}
            redux           = {@props.redux} />

        cb = opts.cb
        opts.cb = (err, value) =>
            @setState(action:'')
            if action == 'fetch_coupon'
                cb(err, value)
            else if err
                @setState(error:JSON.stringify(err))
                cb?(err)
            else
                @update_customer(cb)
        {webapp_client} = require('./webapp_client')   # do not put at top level, since some code runs on server
        webapp_client["stripe_#{action}"](opts)
