An ingestible capsule is provided for delivering medication to a subject. A capsule coating dissolves in a gastrointestinal tract of the subject. An inner core of the capsule has an outer surface associated therewith. The outer surface is disposed within the coating and expands when the coating dissolves. A medication is disposed on the outer surface, and the outer surface is configured such that the medication contacts an intestinal wall of the subject when the outer surface expands. Other embodiments are also provided.