Relation between three modules

Relation between three modules

In my ZOHO CRM I have the modules:
- Contacts (Standar Module)
      - contact_id  (I have it)
- Payment Magnament (Custom Module 1)
      - customModule1.id (I have it)
      - contacts.contact_id (I have it)
- Payments (Custom Module 2)
      - customModule1.id (I have it)
      - contacts.contact_id  (I have not it)

Between the modules Contacts and Payment Management I have relation but in the module Payment only have relation with Payment Management with customModule1.id and I need to get contacts.contact_id. Will be possible to pass customModule1.id  from Contact to Payment?