I've researched this more on the stripe API documentation... You haven't inserted the order into the database at the time that the createToken script is called. I also see that isn't where the metadata is supposed to be added.
I think it would be added in the createCharge call around line 51. However the order hasn't been added to the database yet in that case either. The order isn't added to the database until after the payment is confirmed.
I think a possible solution would be to use the session_id() value in the metadata and then save that with the order in the database so that you could cross reference that way. I think we need a premier ticket to do this effectively.