The coupon can't be applied until after the plan is applied only because it's a plan-specific coupon. Therefore it can't be applied to a checkout without a subscription/plan.
In order to add it, the plan must be done before adding the coupon. The following code accomplishes this goal.
const checkoutPricing = recurly.Pricing.Checkout();
checkoutPricing
.subscription(recurly.Pricing.Subscription()
.plan('basic', {quantity: 1})
.catch(function (err){ console.log('subscription error',
{err})})
.done(function(price) {
console.log(price)
checkoutPricing.coupon('test-basic-coupon')
.done( function (price) {
console.log(price)
})
}))