3 ways to load payments associated with order in drupal 8

So you have and order, but don't know how to get to payments that are referencing this order, there are few ways you can achieve that. First is to load it by properties

$payments = \Drupal::entityTypeManager()->getStorage('commerce_payment')->loadByProperties(['order_id' => $order->id()]);

second is to load them by order

$payments = \Drupal::entityTypeManager()->getStorage('commerce_payment')->loadMultipleByOrder($order);;

this 2 are similar, just different methods used. Third option is using queries and is a bit slimer at start as it doesn't load whole entities 

$payments = \Drupal::entityQuery('commerce_payment')->condition('order_id', $order->id())->execute();