diff --git a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp
index e8296fa..5940578 100644
--- a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp
+++ b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp
@@ -32,6 +32,13 @@
 
 namespace admin {
 
+namespace {
+
+constexpr uint32_t kDefaultSetupPinCode    = 20202021;
+constexpr uint16_t kDefaultLocalBridgePort = 5540;
+
+} // namespace
+
 void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err)
 {
     if (mBridgeNodeId != deviceId)
@@ -92,10 +99,8 @@
 
     mBridgeNodeId = remoteId;
 
-    DeviceManager::Instance().PairRemoteFabricBridge(remoteId, mSetupPINCode, reinterpret_cast<const char *>(mRemoteAddr.data()),
-                                                     mRemotePort);
-
-    return CHIP_NO_ERROR;
+    return PairingManager::Instance().PairDevice(remoteId, mSetupPINCode, reinterpret_cast<const char *>(mRemoteAddr.data()),
+                                                 mRemotePort);
 }
 
 void FabricSyncRemoveBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_ERROR err)
@@ -135,9 +140,8 @@
     mBridgeNodeId = bridgeNodeId;
 
     PairingManager::Instance().SetPairingDelegate(this);
-    DeviceManager::Instance().UnpairRemoteFabricBridge();
 
-    return CHIP_NO_ERROR;
+    return PairingManager::Instance().UnpairDevice(bridgeNodeId);
 }
 
 void FabricSyncAddLocalBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err)
@@ -185,18 +189,10 @@
     PairingManager::Instance().SetPairingDelegate(this);
     mLocalBridgeNodeId = deviceId;
 
-    if (mSetupPINCode.HasValue())
-    {
-        DeviceManager::Instance().SetLocalBridgeSetupPinCode(mSetupPINCode.Value());
-    }
-    if (mLocalPort.HasValue())
-    {
-        DeviceManager::Instance().SetLocalBridgePort(mLocalPort.Value());
-    }
+    uint16_t localBridgePort         = mLocalPort.ValueOr(kDefaultLocalBridgePort);
+    uint32_t localBridgeSetupPinCode = mSetupPINCode.ValueOr(kDefaultSetupPinCode);
 
-    DeviceManager::Instance().PairLocalFabricBridge(deviceId);
-
-    return CHIP_NO_ERROR;
+    return PairingManager::Instance().PairDevice(deviceId, localBridgeSetupPinCode, "::1", localBridgePort);
 }
 
 void FabricSyncRemoveLocalBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_ERROR err)
@@ -236,9 +232,8 @@
     mLocalBridgeNodeId = bridgeNodeId;
 
     PairingManager::Instance().SetPairingDelegate(this);
-    DeviceManager::Instance().UnpairLocalFabricBridge();
 
-    return CHIP_NO_ERROR;
+    return PairingManager::Instance().UnpairDevice(mLocalBridgeNodeId);
 }
 
 void FabricSyncDeviceCommand::OnCommissioningWindowOpened(NodeId deviceId, CHIP_ERROR err, SetupPayload payload)
@@ -259,7 +254,10 @@
 
             usleep(kCommissionPrepareTimeMs * 1000);
 
-            DeviceManager::Instance().PairRemoteDevice(nodeId, payloadBuffer);
+            if (PairingManager::Instance().PairDeviceWithCode(nodeId, payloadBuffer) != CHIP_NO_ERROR)
+            {
+                ChipLogError(NotSpecified, "Failed to sync device " ChipLogFormatX64, ChipLogValueX64(nodeId));
+            }
         }
         else
         {
diff --git a/examples/fabric-admin/device_manager/DeviceManager.cpp b/examples/fabric-admin/device_manager/DeviceManager.cpp
index 41ee1f3..67c634b 100644
--- a/examples/fabric-admin/device_manager/DeviceManager.cpp
+++ b/examples/fabric-admin/device_manager/DeviceManager.cpp
@@ -39,6 +39,7 @@
 constexpr uint16_t kWindowTimeout          = 300;
 constexpr uint16_t kIteration              = 1000;
 constexpr uint16_t kMaxDiscriminatorLength = 4095;
+constexpr uint16_t kResponseTimeoutSeconds = 30;
 
 } // namespace
 
@@ -177,47 +178,6 @@
     }
 }
 
-void DeviceManager::PairRemoteFabricBridge(NodeId nodeId, uint32_t setupPINCode, const char * deviceRemoteIp,
-                                           uint16_t deviceRemotePort)
-{
-    if (PairingManager::Instance().PairDevice(nodeId, setupPINCode, deviceRemoteIp, deviceRemotePort) != CHIP_NO_ERROR)
-    {
-        ChipLogError(NotSpecified, "Failed to pair remote fabric bridge " ChipLogFormatX64, ChipLogValueX64(nodeId));
-    }
-}
-
-void DeviceManager::PairRemoteDevice(NodeId nodeId, const char * payload)
-{
-    if (PairingManager::Instance().PairDeviceWithCode(nodeId, payload) != CHIP_NO_ERROR)
-    {
-        ChipLogError(NotSpecified, "Failed to pair remote device " ChipLogFormatX64, ChipLogValueX64(nodeId));
-    }
-}
-
-void DeviceManager::PairLocalFabricBridge(NodeId nodeId)
-{
-    if (PairingManager::Instance().PairDevice(nodeId, mLocalBridgeSetupPinCode, "::1", mLocalBridgePort) != CHIP_NO_ERROR)
-    {
-        ChipLogError(NotSpecified, "Failed to pair local fabric bridge " ChipLogFormatX64, ChipLogValueX64(nodeId));
-    }
-}
-
-void DeviceManager::UnpairRemoteFabricBridge()
-{
-    if (PairingManager::Instance().UnpairDevice(mRemoteBridgeNodeId) != CHIP_NO_ERROR)
-    {
-        ChipLogError(NotSpecified, "Failed to unpair remote bridge device " ChipLogFormatX64, ChipLogValueX64(mRemoteBridgeNodeId));
-    }
-}
-
-void DeviceManager::UnpairLocalFabricBridge()
-{
-    if (PairingManager::Instance().UnpairDevice(mLocalBridgeNodeId) != CHIP_NO_ERROR)
-    {
-        ChipLogError(NotSpecified, "Failed to unpair local bridge device " ChipLogFormatX64, ChipLogValueX64(mLocalBridgeNodeId));
-    }
-}
-
 void DeviceManager::SubscribeRemoteFabricBridge()
 {
     ChipLogProgress(NotSpecified, "Start subscription to the remote bridge.");
diff --git a/examples/fabric-admin/device_manager/DeviceManager.h b/examples/fabric-admin/device_manager/DeviceManager.h
index 8c273ee..b326996 100644
--- a/examples/fabric-admin/device_manager/DeviceManager.h
+++ b/examples/fabric-admin/device_manager/DeviceManager.h
@@ -28,10 +28,6 @@
 
 namespace admin {
 
-constexpr uint32_t kDefaultSetupPinCode    = 20202021;
-constexpr uint16_t kDefaultLocalBridgePort = 5540;
-constexpr uint16_t kResponseTimeoutSeconds = 30;
-
 class SyncedDevice
 {
 public:
@@ -73,8 +69,6 @@
 
     void SetRemoteBridgeNodeId(chip::NodeId nodeId);
 
-    void SetLocalBridgePort(uint16_t port) { mLocalBridgePort = port; }
-    void SetLocalBridgeSetupPinCode(uint32_t pinCode) { mLocalBridgeSetupPinCode = pinCode; }
     void SetLocalBridgeNodeId(chip::NodeId nodeId) { mLocalBridgeNodeId = nodeId; }
 
     bool IsFabricSyncReady() const { return mRemoteBridgeNodeId != chip::kUndefinedNodeId; }
@@ -133,45 +127,6 @@
      */
     void OpenRemoteDeviceCommissioningWindow(chip::EndpointId remoteEndpointId);
 
-    /**
-     * @brief Pair a remote fabric bridge with a given node ID.
-     *
-     * This function initiates the pairing process for a remote fabric bridge using the specified parameters.
-
-     * @param nodeId            The user-defined ID for the node being commissioned. It doesn’t need to be the same ID,
-     *                          as for the first fabric.
-     * @param setupPINCode      The setup PIN code used to authenticate the pairing process.
-     * @param deviceRemoteIp    The IP address of the remote device that is being paired as part of the fabric bridge.
-     * @param deviceRemotePort  The secured device port of the remote device that is being paired as part of the fabric bridge.
-     */
-    void PairRemoteFabricBridge(chip::NodeId nodeId, uint32_t setupPINCode, const char * deviceRemoteIp, uint16_t deviceRemotePort);
-
-    /**
-     * @brief Pair a remote Matter device to the current fabric.
-     *
-     * This function initiates the pairing process for a remote device using the specified parameters.
-
-     * @param nodeId            The user-defined ID for the node being commissioned. It doesn’t need to be the same ID,
-     *                          as for the first fabric.
-     * @param payload           The the QR code payload or a manual pairing code generated by the first commissioner
-     *                          instance when opened commissioning window.
-     */
-    void PairRemoteDevice(chip::NodeId nodeId, const char * payload);
-
-    /**
-     * @brief Pair a local fabric bridge with a given node ID.
-     *
-     * This function initiates the pairing process for the local fabric bridge using the specified parameters.
-
-     * @param nodeId            The user-defined ID for the node being commissioned. It doesn’t need to be the same ID,
-     *                          as for the first fabric.
-     */
-    void PairLocalFabricBridge(chip::NodeId nodeId);
-
-    void UnpairRemoteFabricBridge();
-
-    void UnpairLocalFabricBridge();
-
     void SubscribeRemoteFabricBridge();
 
     void ReadSupportedDeviceCategories();
@@ -204,8 +159,6 @@
     // This represents the bridge on the other ecosystem.
     chip::NodeId mRemoteBridgeNodeId = chip::kUndefinedNodeId;
 
-    uint16_t mLocalBridgePort         = kDefaultLocalBridgePort;
-    uint32_t mLocalBridgeSetupPinCode = kDefaultSetupPinCode;
     // The Node ID of the local bridge used for Fabric-Sync
     // This represents the bridge within its own ecosystem.
     chip::NodeId mLocalBridgeNodeId = chip::kUndefinedNodeId;
diff --git a/examples/fabric-admin/rpc/RpcServer.cpp b/examples/fabric-admin/rpc/RpcServer.cpp
index 06f7d82..a7c9259 100644
--- a/examples/fabric-admin/rpc/RpcServer.cpp
+++ b/examples/fabric-admin/rpc/RpcServer.cpp
@@ -179,7 +179,11 @@
             // RequestCommissioningApproval, you need to wait for it to open a commissioning window on its bridge.
             usleep(kCommissionPrepareTimeMs * 1000);
             PairingManager::Instance().SetPairingDelegate(this);
-            DeviceManager::Instance().PairRemoteDevice(mNodeId, code.c_str());
+
+            if (PairingManager::Instance().PairDeviceWithCode(mNodeId, code.c_str()) != CHIP_NO_ERROR)
+            {
+                ChipLogError(NotSpecified, "Failed to commission device " ChipLogFormatX64, ChipLogValueX64(mNodeId));
+            }
         }
         else
         {
