If your roommate fails to pay an agreed-upon portion of the rent and the landlord collects it from you, you would ordinarily have a right to recover that amount from your roommate.