The most-up-to-date version of this list for the latest version of Rails can be found in the ActiveRecord::Callbacks documentation. The lists for Rails 4, 3 & 2 are below.
Rails 4
The most up-to-date version of this list can be found in the Rails 4 Guides.
Creating an object
before_validationafter_validationbefore_savearound_savebefore_createaround_createafter_createafter_saveafter_commit/after_rollback
Updating an object
before_validationafter_validationbefore_savearound_savebefore_updatearound_updateafter_updateafter_saveafter_commit/after_rollback
Destroying an object
before_destroyaround_destroyafter_destroyafter_commit/after_rollback
Rails 3
The most up-to-date version of this list can be found in the Rails 3 Guides.
Creating an object
before_validationafter_validationbefore_savearound_savebefore_createaround_createafter_createafter_save
Updating an object
before_validationafter_validationbefore_savearound_savebefore_updatearound_updateafter_updateafter_save
Destroying an object
before_destroyaround_destroyafter_destroy
Rails 2
The most up-to-date version of this list can be found in the Rails 2.3 Guides
Creating an object
before_validationbefore_validation_on_createafter_validationafter_validation_on_createbefore_savebefore_createINSERToperationafter_createafter_save
Updating an object
before_validationbefore_validation_on_updateafter_validationafter_validation_on_updatebefore_savebefore_updateUPDATEoperationafter_updateafter_save
Destroying an object
before_destroyDELETEoperationafter_destroy
Since you need to first validate the reference_code, the assign_reference method can be called in the after_validation callback or any callback appearing after it in the list I provided above.