A digital range cap/floor is a cap/floor with two European barriers. That is, it only matters where the underlying asset is in relation to the barrier on the caplet’s expiry date.
As well as defining the range, you must also define whether the interest rate should be within the range or outside the range on the expiry date. On the expiry date, if the option is in the money (the interest rate index is within or outside the defined range as specified) the fixed payout is activated; if the option is out of the money (the interest rate index is not within or without the range as specified) no payout is made.
The annual payout is defined as a specified percentage of the notional defined. Therefore for each fixing that the option is in the money the holder receives:
(notional * payout %) * relevant daycount fraction
Any payout is made on the caplet/floorlet’s payment date; the premium is always paid upfront.